Answer the question
In order to leave comments, you need to log in
How to not rebuild files in browserify that haven't changed?
In gallp I have a task that collects all scripts via browserify. But the problem is that I have several js files going, and just a little, everything is rebuilt. This is starting to take too long, and I thought, is there any way to avoid this? I tried using watchify but it didn't seem to help. The task itself looks something like this
watchify(browserify({
entries: './src/js/script/index.coffee',
debug: true,
transform: ['jadeify','coffeeify'],
extensions: ['.coffee', '.jade']
})).bundle().pipe(source('index.coffee'))
.pipe(rename('index.js'))
.pipe(convertEncoding({to: 'utf-8'}))
.pipe(gulp.dest(BUILDPATH+'js/'))
.pipe(browserSync.stream());
watchify(browserify({
entries: './src/js/script/intro.coffee',
debug: true,
transform: ['jadeify','coffeeify'],
extensions: ['.coffee', '.jade']
})).bundle().pipe(source('intro.coffee'))
.pipe(rename('intro.js'))
.pipe(convertEncoding({to: 'utf-8'}))
.pipe(gulp.dest(BUILDPATH+'js/'))
.pipe(browserSync.stream());
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question