-
-
Notifications
You must be signed in to change notification settings - Fork 4.8k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Signed-off-by: Alexander Mays <maysale01@gmail.com>
- Loading branch information
Alexander Mays
committed
Feb 9, 2016
1 parent
244febf
commit 18f9e53
Showing
2 changed files
with
30 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
#!/usr/bin/env node | ||
|
||
var nodemon = require('nodemon'); | ||
var babel = require("babel-core"); | ||
var gaze = require('gaze'); | ||
var fs = require('fs'); | ||
|
||
// Watch the src and transpile when changed | ||
gaze('src/**/*', function(err, watcher) { | ||
if (err) throw err; | ||
watcher.on('changed', function(file) { | ||
console.log(file + " has changed"); | ||
fs.writeFile(file.replace(/\/src\//, "/lib/"), babel.transformFileSync(file).code); | ||
}); | ||
}); | ||
|
||
// Run and watch dist | ||
nodemon({ | ||
script: 'bin/parse-server', | ||
ext: 'js json', | ||
watch: 'lib' | ||
}); | ||
|
||
process.once('SIGINT', function() { | ||
process.exit(0); | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters