Create empty install.json if none exists.

This commit is contained in:
ccd0 2016-04-11 03:04:14 -07:00
parent 0de988eca6
commit e751b5e3be
2 changed files with 8 additions and 11 deletions

View File

@ -163,13 +163,16 @@ builds/% : testbuilds/% $(jshint) $(cp_deps)
test.html : README.md template.jst tools/markdown.js node_modules/marked/package.json node_modules/lodash/package.json test.html : README.md template.jst tools/markdown.js node_modules/marked/package.json node_modules/lodash/package.json
node tools/markdown.js node tools/markdown.js
.jshintrc: tools/templates.coffee src/meta/jshint.json $(template_deps) .jshintrc : tools/templates.coffee src/meta/jshint.json $(template_deps)
$(template) src/meta/jshint.json .jshintrc $(template) src/meta/jshint.json .jshintrc
.events/jshint.% : tmp/%.js $(jshint_deps) | .events .events/jshint.% : tmp/%.js $(jshint_deps) | .events
$(BIN)jshint $< $(BIN)jshint $<
echo -> $@ echo -> $@
install.json :
echo {}> $@
.events/install : $(testbuilds) $(jshint) install.json tools/install.js node_modules/fs-extra/package.json | .events .events/install : $(testbuilds) $(jshint) install.json tools/install.js node_modules/fs-extra/package.json | .events
node tools/install.js node tools/install.js
echo -> $@ echo -> $@

View File

@ -1,14 +1,8 @@
var fs = require('fs-extra'); var fs = require('fs-extra');
try { var installMap = fs.readJsonSync('install.json');
var installMap = fs.readJsonSync('install.json'); for (src in installMap) {
for (src in installMap) { for (dest of installMap[src]) {
for (dest of installMap[src]) { fs.copySync(src, dest);
fs.copySync(src, dest);
}
}
} catch(err) {
if (err.code !== 'ENOENT') {
throw err;
} }
} }