Merge pull request #95 from r3dm/fix/save-instruct-in-root

Save instructions.json in root dir
This commit is contained in:
Miroslav Bajtoš 2015-02-20 12:39:31 +01:00
commit 9b407b1ada
2 changed files with 2 additions and 1 deletions

1
.gitignore vendored
View File

@ -12,6 +12,7 @@
*.swo *.swo
*.iml *.iml
node_modules node_modules
generated-instructions.json
checkstyle.xml checkstyle.xml
loopback-boot-*.tgz loopback-boot-*.tgz
/test/sandbox/ /test/sandbox/

View File

@ -94,7 +94,7 @@ function bundleInstructions(instructions, bundler) {
// Write the instructions to a file in our node_modules folder. // Write the instructions to a file in our node_modules folder.
// The location should not really matter as long as it is .gitignore-ed // The location should not really matter as long as it is .gitignore-ed
var instructionsFile = path.resolve(__dirname, var instructionsFile = path.resolve(__dirname,
'..', 'node_modules', 'instructions.json'); '..', 'generated-instructions.json');
fs.writeFileSync(instructionsFile, instructionsString, 'utf-8'); fs.writeFileSync(instructionsFile, instructionsString, 'utf-8');
bundler.require(instructionsFile, { expose: 'loopback-boot#instructions' }); bundler.require(instructionsFile, { expose: 'loopback-boot#instructions' });