diff --git a/gulpfile.js b/gulpfile.js index 6ad52239..fb5c96c6 100644 --- a/gulpfile.js +++ b/gulpfile.js @@ -12,6 +12,7 @@ var less = require('gulp-less'); var handlebars = require('gulp-handlebars'); var wrap = require('gulp-wrap'); var declare = require('gulp-declare'); +var watch = require('gulp-watch'); /* * Clean ups ./dist folder @@ -86,7 +87,7 @@ gulp.task('less', ['clean'], function() { /* * Copy lib and html folders */ -gulp.task('copy', ['clean'], function() { +gulp.task('copy', ['less'], function() { // copy JavaScript files inside lib folder gulp @@ -101,5 +102,14 @@ gulp.task('copy', ['clean'], function() { .on('error', gutil.log) }); +/* + * Watch for changes and recompile +*/ +gulp.task('watch', function() { + watch(['./src/**/*.{coffee,js,less}'], function() { + gulp.start('default'); + }); +}); + -gulp.task('default', ['dist', 'less', 'copy']); +gulp.task('default', ['dist', 'copy']); diff --git a/package.json b/package.json index a6d287f2..cc3ce004 100644 --- a/package.json +++ b/package.json @@ -19,7 +19,6 @@ "readmeFilename": "README.md", "dependencies": {}, "devDependencies": { - "swagger-client": "2.1.0-alpha.7", "chai": "^1.10.0", "cors": "2.1.1", "docco": "0.4.x", @@ -35,10 +34,12 @@ "gulp-rename": "^1.2.0", "gulp-uglify": "^1.1.0", "gulp-util": "^3.0.2", + "gulp-watch": "^4.1.0", "gulp-wrap": "^0.10.1", "http-server": "^0.7.4", "less": "~1.4.2", "mocha": "^2.1.0", - "selenium-webdriver": "^2.44.0" + "selenium-webdriver": "^2.44.0", + "swagger-client": "2.1.0-alpha.7" } }