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