Fix bugs in 18f0b779c31835308d0be48c02e3d16c3f821c31 so the code actually gets checked. #833

This commit is contained in:
ccd0 2016-04-12 08:34:18 -07:00
parent 18f0b779c3
commit 75ef03e7a5
2 changed files with 16 additions and 16 deletions

View File

@ -22,7 +22,7 @@ cat := node tools/cat.js
cat_deps := tools/cat.js cat_deps := tools/cat.js
jshint_deps := .jshintrc node_modules/jshint/package.json jshint_deps := .jshintrc node_modules/jshint/package.json
groups := 0 1 2 3 4 5 6 7 8 9 10 11 12 13 parts := 0 1 2 3 4 5 6 7 8 9 10 11 12 13
sources0 := \ sources0 := \
src/General/Config.coffee \ src/General/Config.coffee \
@ -79,7 +79,7 @@ sources13 := \
src/General/Settings.coffee \ src/General/Settings.coffee \
src/General/Main.coffee src/General/Main.coffee
sources := $(foreach i,$(groups),$(sources$(i))) sources := $(foreach i,$(parts),$(sources$(i)))
imports := \ imports := \
node_modules/font-awesome/package.json \ node_modules/font-awesome/package.json \
@ -127,7 +127,7 @@ node_modules/%/package.json : .events/npm
.tests_enabled : .tests_enabled :
echo false> .tests_enabled echo false> .tests_enabled
define rules_group define rules_part
tmp/parts/script$1.coffee : $$(sources$1) $(cat_deps) | tmp/parts tmp/parts/script$1.coffee : $$(sources$1) $(cat_deps) | tmp/parts
$(cat) $$(sources$1) $$@ $(cat) $$(sources$1) $$@
@ -140,10 +140,10 @@ tmp/parts/script$1-%.js : tmp/parts/script$1-%.coffee $(coffee_deps)
endef endef
$(foreach i,$(groups),$(eval $(call rules_group,$(i)))) $(foreach i,$(parts),$(eval $(call rules_part,$(i))))
tmp/script-%.js : $(foreach i,$(groups),tmp/parts/script$(i)-%.js) tools/cat-coffee.js tmp/script-%.js : $(foreach i,$(parts),tmp/parts/script$(i)-%.js) tools/cat-coffee.js
node tools/cat-coffee.js $(foreach i,$(groups),tmp/parts/script$(i)-$*.js) $@ node tools/cat-coffee.js $(foreach i,$(parts),tmp/parts/script$(i)-$*.js) $@
tmp/eventPage.js : src/General/eventPage.coffee $(coffee_deps) | tmp tmp/eventPage.js : src/General/eventPage.coffee $(coffee_deps) | tmp
$(coffee) -o tmp src/General/eventPage.coffee $(coffee) -o tmp src/General/eventPage.coffee
@ -207,7 +207,7 @@ tmp/parts/.jshintrc : src/meta/jshint.json $(template_deps) | tmp/parts
$(BIN)jshint $< $(BIN)jshint $<
echo -> $@ echo -> $@
.events/jshint_parts.% : tmp/parts/%.js tmp/parts/.jshintrc node_modules/jshint/package.json | .events .events/jshint.% : tmp/parts/%.js tmp/parts/.jshintrc node_modules/jshint/package.json | .events
$(BIN)jshint $< $(BIN)jshint $<
echo -> $@ echo -> $@

View File

@ -19,17 +19,17 @@
"cloneInto": true, "cloneInto": true,
"unsafeWindow": true, "unsafeWindow": true,
"chrome": true<%= "chrome": true<%=
meta.grants.map(x => `,\n "${x}": true` meta.grants.map(x => `,\n "${x}": true`).join('')
).join('') %><% if (stage === 'parts') { %><%=
%><% if (stage === 'parts') { %> meta.globals.map(x => `,\n "${x}": true`).join('')
meta.globals.map(x => `,\n "${x}": true` %><%=
<% } %><% if (stage === 'parts') { %> (ls('src')
fs.readdirSync('src') .map(x => ls(`src/${x}`))
.map(x => fs.readdirSync(`src/${x}`))
.reduce((x,y) => x.concat(y)) .reduce((x,y) => x.concat(y))
.filter(x => /^[$A-Z]\w*\.coffee/.test(x)) .filter(x => /^[$A-Z]\w*\.coffee/.test(x))
.map(x => x.split('.')[0]) .map(x => x.split('.')[0])
.map(x => `,\n "${x}": true` .map(x => `,\n "${x}": true`).join('')
<% } %> )
%><% } %>
} }
} }