Create empty install.json if none exists.
This commit is contained in:
parent
0de988eca6
commit
e751b5e3be
3
Makefile
3
Makefile
@ -170,6 +170,9 @@ test.html : README.md template.jst tools/markdown.js node_modules/marked/package
|
||||
$(BIN)jshint $<
|
||||
echo -> $@
|
||||
|
||||
install.json :
|
||||
echo {}> $@
|
||||
|
||||
.events/install : $(testbuilds) $(jshint) install.json tools/install.js node_modules/fs-extra/package.json | .events
|
||||
node tools/install.js
|
||||
echo -> $@
|
||||
|
||||
@ -1,14 +1,8 @@
|
||||
var fs = require('fs-extra');
|
||||
|
||||
try {
|
||||
var installMap = fs.readJsonSync('install.json');
|
||||
for (src in installMap) {
|
||||
for (dest of installMap[src]) {
|
||||
fs.copySync(src, dest);
|
||||
}
|
||||
}
|
||||
} catch(err) {
|
||||
if (err.code !== 'ENOENT') {
|
||||
throw err;
|
||||
}
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user