0
目前,我有一个非常简单的咕嘟咕嘟构建脚本:咕嘟咕嘟Nodemon - 如何让我Nodemon出口上的文件更改
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'
})
})
此重新加载上的变化页面JS
或HTML
文件。
这对开发很有用,但对于生产我想要的恰恰相反。如果我的文件发生更改,那是因为推送到我的服务器的git。这意味着詹金斯将运行,之后完成詹金斯将代码推送到我的web文件夹。
我想,如果詹金斯推动代码制止这种nodemon服务器,因为一个完全新鲜的吞建造将被执行,其中包括Nodemon服务器。
所以 - 我怎样才能让nodemon在文件改变而不是重新启动后退出?
同样的问题依然存在,我该如何停止文件变化的过程? – Randy