node.js - Gulp Nodemon - how do I make Nodemon exit on file change -


currently have simple gulp build script:

const gulp = require('gulp'); const ts = require('gulp-typescript'); const tsproject = ts.createproject('tsconfig.json'); const del = require('del'); const nodemon = require('gulp-nodemon');  gulp.task('build-clean', function() {     return del('dist'); });  gulp.task('build', ['build-clean'], function () {     return gulp.src('src/**/*.ts')         .pipe(tsproject())         .pipe(gulp.dest('dist')); });  gulp.task('start', ['build'], function () {   nodemon({     script: 'dist/app.js'   , ext: 'js html'   }) }) 

this reloads page on changes js or html files.

this useful developing, on production want exact opposite. if files change, that's because of git push server. means jenkins run, after that's finished jenkins push code webfolder.

i want stop nodemon server if jenkins pushes code, because fresh gulp-build executed, including nodemon server.

so - how can make nodemon exit after files change instead of restarting?

maybe should use nodein production instead of nodemon

gulp.task('start', ['build'], function () {   node({     script: 'dist/app.js'   , ext: 'js html'   }) }) 

Comments

Popular posts from this blog

commonjs - How to write a typescript definition file for a node module that exports a function? -

openid - Okta: Failed to get authorization code through API call -

thorough guide for profiling racket code -