Special treatment of src/main confused Windows and was needlessly complex.
This commit is contained in:
parent
31fd581c1d
commit
213d898b1b
14
Makefile
14
Makefile
@ -26,29 +26,29 @@ cat_deps := tools/cat.js
|
|||||||
capitalized = $(filter-out a,$(foreach x,$1,$(subst a $(x),,$(sort a $(x)))))
|
capitalized = $(filter-out a,$(foreach x,$1,$(subst a $(x),,$(sort a $(x)))))
|
||||||
|
|
||||||
parts := \
|
parts := \
|
||||||
globals Config css platform classes \
|
globals config css platform classes \
|
||||||
$(sort $(call capitalized, \
|
$(sort $(call capitalized, \
|
||||||
$(subst src/,,$(wildcard src/*)) \
|
$(subst src/,,$(wildcard src/*)) \
|
||||||
)) \
|
)) \
|
||||||
Main
|
main
|
||||||
|
|
||||||
lang = $(if $(filter globals css,$1),js,coffee)
|
lang = $(if $(filter globals css,$1),js,coffee)
|
||||||
|
|
||||||
# remove extension when sorting so X.coffee comes before X.Y.coffee
|
# remove extension when sorting so X.coffee comes before X.Y.coffee
|
||||||
sources_lang = \
|
sources_lang = \
|
||||||
$(subst !,.$2,$(sort $(subst .$2,!, \
|
$(subst !,.$2,$(sort $(subst .$2,!, \
|
||||||
$(wildcard src/$1/*.$2 src/main/$1.$2))))
|
$(wildcard src/$1/*.$2))))
|
||||||
|
|
||||||
sources = $(call sources_lang,$1,$(call lang,$1))
|
sources = $(call sources_lang,$1,$(call lang,$1))
|
||||||
|
|
||||||
imports = \
|
imports = \
|
||||||
$(filter-out %.coffee %.js,$(wildcard src/$1/*.* src/$1/*/*.* src/$1/*/*/*.* src/main/$1.*)) \
|
$(filter-out %.coffee %.js,$(wildcard src/$1/*.* src/$1/*/*.* src/$1/*/*/*.*)) \
|
||||||
.tests_enabled \
|
.tests_enabled \
|
||||||
$(imports_$1)
|
$(imports_$1)
|
||||||
|
|
||||||
imports_globals := \
|
imports_globals := \
|
||||||
version.json
|
version.json
|
||||||
imports_Config := \
|
imports_config := \
|
||||||
src/Archive/archives.json
|
src/Archive/archives.json
|
||||||
imports_css := \
|
imports_css := \
|
||||||
tools/style.js \
|
tools/style.js \
|
||||||
@ -140,8 +140,8 @@ $(foreach p, \
|
|||||||
$(eval $(call compile,$(p))) \
|
$(eval $(call compile,$(p))) \
|
||||||
)
|
)
|
||||||
|
|
||||||
tmp/eventPage.js : src/main/eventPage.coffee $(coffee_deps) | tmp
|
tmp/eventPage.js : src/meta/eventPage.coffee $(coffee_deps) | tmp
|
||||||
$(coffee) -o tmp src/main/eventPage.coffee
|
$(coffee) -o tmp src/meta/eventPage.coffee
|
||||||
|
|
||||||
define rules_channel
|
define rules_channel
|
||||||
|
|
||||||
|
|||||||
@ -796,7 +796,7 @@ Config =
|
|||||||
|
|
||||||
favicon: 'ferongr'
|
favicon: 'ferongr'
|
||||||
|
|
||||||
usercss: `<%= multiline(read('src/main/Config.usercss.css')) %>`
|
usercss: `<%= multiline(read('src/config/user.css')) %>`
|
||||||
|
|
||||||
hotkeys:
|
hotkeys:
|
||||||
# QR & Options
|
# QR & Options
|
||||||
@ -1,10 +1,8 @@
|
|||||||
var fs = require('fs');
|
var fs = require('fs');
|
||||||
|
|
||||||
var basename = process.argv[2].split('_')[0]; // e.g. template_crx -> template
|
|
||||||
var filename = `tmp/${process.argv[2]}.js`;
|
var filename = `tmp/${process.argv[2]}.js`;
|
||||||
|
var basename = process.argv[2].split('_')[0]; // e.g. template_crx -> template
|
||||||
// If it's not a collection of files in src/, it's a single file in src/main/
|
var sources = fs.readdirSync(`src/${basename}`);
|
||||||
var sources = (fs.readdirSync('src').indexOf(basename) >= 0) ? fs.readdirSync(`src/${basename}`) : [`${basename}.coffee`];
|
|
||||||
|
|
||||||
// Extract variables to be made global from source file list
|
// Extract variables to be made global from source file list
|
||||||
// e.g. ImageExpand from src/Images/ImageExpand.coffee
|
// e.g. ImageExpand from src/Images/ImageExpand.coffee
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user