mirror of
https://github.com/absmach/magistrala.git
synced 2026-06-23 04:10:28 +00:00
Added gulpfile
This commit is contained in:
+25
@@ -0,0 +1,25 @@
|
||||
/* File: gulpfile.js */
|
||||
|
||||
// grab our packages
|
||||
var gulp = require('gulp');
|
||||
var jshint = require('gulp-jshint');
|
||||
var nodemon = require('gulp-nodemon');
|
||||
|
||||
// define the default task and add the watch task to it
|
||||
gulp.task('default', ['watch']);
|
||||
|
||||
// configure the jshint task
|
||||
gulp.task('jshint', function() {
|
||||
return gulp.src('app/**/*.js')
|
||||
.pipe(jshint())
|
||||
.pipe(jshint.reporter('jshint-stylish'));
|
||||
});
|
||||
|
||||
// configure which files to watch and what tasks to use on file changes
|
||||
gulp.task('watch', function() {
|
||||
gulp.watch('app/**/*.js', ['jshint']);
|
||||
|
||||
// Start up the server and have it reload when anything in the
|
||||
// ./build/ directory changes
|
||||
nodemon({script: 'server.js', watch: 'app/**'});
|
||||
});
|
||||
+12
-7
@@ -1,9 +1,14 @@
|
||||
{
|
||||
"name": "node-api",
|
||||
"main": "server.js",
|
||||
"dependencies": {
|
||||
"express": "~4.0.0",
|
||||
"mongoose": "~3.6.13",
|
||||
"body-parser": "~1.0.1"
|
||||
}
|
||||
"name": "node-api",
|
||||
"main": "server.js",
|
||||
"dependencies": {
|
||||
"express": "~4.0.0",
|
||||
"mongoose": "~3.6.13",
|
||||
"body-parser": "~1.0.1"
|
||||
},
|
||||
"devDependencies": {
|
||||
"gulp-jshint": "^1.11.2",
|
||||
"gulp-nodemon": "^2.0.3",
|
||||
"jshint-stylish": "^2.0.1"
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user