Questions tagged [watchify]

Watchify allows you to send all your notifications to your SmartWatch2. persistent browserify bundler that watches files for changes and only rebuilds what it needs to. Watchify doesn't have a gulp plugin, but it doesn't need one either: you can use vinyl-source-stream to pipe the bundle stream into your gulp pipeline.

watchify is a persistent browserify bundler that watches files for changes and only rebuilds what it needs to. Watchify doesn't have a gulp plugin, but it doesn't need one either as it's possible to use vinyl-source-stream to pipe the bundle stream into the gulp pipeline.

watchify npm package: https://www.npmjs.com/package/watchify.

89 questions
13
votes
1 answer

difference between watchify and gulp.watch

I have just started using Browserify with gulp and I came across examples using watchify. What I don't understand is that why not use gulp.watch instead? What is the difference between watchify and gulp.watch?
Flake
  • 1,386
  • 17
  • 31
12
votes
2 answers

Watchify doesn't always detect changes in javascript files

I created a gulp task for bundling modules with browserify and I am using watchify to watch for changes. Here is my gulp task for watchify: gulp.task('watch:browserify', function () { var opts = assign({}, watchify.args, { entries:…
tuks
  • 800
  • 3
  • 11
  • 27
11
votes
4 answers

How to set up gulp to bundle several files into one?

This seems like a very simple question, but spent the last 3 hours researching it, discovering it can be slow on every save on a new file if not using watchify. This is my directory tree: gulpfile.js package.json www/ default.htm
10
votes
1 answer

Watchify w/ gulp and babel gets progressively slower

Everytime watchify detects a change, the bundle time gets slower. There must be something wrong in my gulp task. Anyone any ideas? gulp.task('bundle', function() { var bundle = browserify({ debug: true, extensions:…
user2927940
9
votes
1 answer

During dev, how can I block page load until watchify finishes?

Here's a typical workflow: Edit JS file Save file, watchify automatically starts rebuilding it for me alt-tab to browser ctrl+R to reload page That's great, except if watchify takes longer than steps 3 and 4, it sucks because you either get the…
dumbmatter
  • 9,351
  • 7
  • 41
  • 80
9
votes
1 answer

Performance issues with Browserify + Watchify + Tsify + Gulp

I have a "medium" Typescript application (as in, not trivial, but not enterprise-level either, many thousands of lines) with dependencies on jQuery, React and SocketIO - among other smaller libraries. My current gulpfile is this: var gulp =…
user19302
9
votes
1 answer

Why we should pass watchify arguments to browserify?

From the document of watchify, I see: When creating the browserify instance b you MUST set these properties in the constructor: var b = browserify({ cache: {}, packageCache: {}, fullPaths: true }) The 3 parameters cache: {}, packageCache: {},…
Freewind
  • 193,756
  • 157
  • 432
  • 708
9
votes
3 answers

gulp browserify reactify task is quite slow

I am using Gulp as my task runner and browserify to bundle my CommonJs modules. I have noticed that running my browserify task is quite slow, it takes around 2 - 3 seconds, and all I have is React and a few very small components I have built for…
svnm
  • 22,878
  • 21
  • 90
  • 105
8
votes
5 answers

Gulp with watchify/browserify runs twice then stops watching

Here is my gulpfile.js var gulp = require('gulp'); var browserify = require('browserify'); var source = require("vinyl-source-stream"); var reactify = require("reactify"); var watchify = require('watchify'); var gutil = require('gulp-util'); var…
thealexbaron
  • 1,558
  • 1
  • 11
  • 25
7
votes
1 answer

Run eslint before watchify runs

I'm adding watchify to our build process but I want to put a precondition to watchify running, and that is that the file(s) that changed pass our linting step (which is using ESLint). I was thinking of doing this: function runBrowserify(watch){ …
Aaron Powell
  • 24,927
  • 18
  • 98
  • 150
6
votes
1 answer

Gulp doesn't exit with watchify, browserify

I would like to set up gulp to be able to do two things: 1) use watchify to monitor updates in files and automatically rebuild using browserify on changes, and 2) do an ad-hoc build once and exit. #1 seems to be working fine, but I'm having trouble…
Kev H
  • 241
  • 2
  • 9
5
votes
2 answers

Gulp- Watchify does not detect changes to a submodule folder

My watchify-program does not detect changes in a sub-module. The submodule is situated in ../js/lib/melajs/**/*.js When I run browserify-program it does however compile the submodule. Below are the two tasks. programAppjs:…
morne
  • 4,035
  • 9
  • 50
  • 96
5
votes
1 answer

Can Watchify pick up changes to html files?

I import html template files into my javascript components using babel-plugin-transform-html-import-to-string. When I use watchify, it doesn't update if an html has been changed. Only Javascript file changes. The npm script goes something like…
MauroPerez
  • 364
  • 3
  • 10
4
votes
1 answer

Node Scripts: Chaining commands with watchify

I'm using npm scripts (see my npm file below) to watch files for changes with watchify and then compile and notify once compiled. However what happens is that the watchify task runs (this takes 40s when first run) then the notify:js task gets…
Enijar
  • 6,387
  • 9
  • 44
  • 73
4
votes
2 answers

Watchify detecting changes but output doesn't change

I have the following gulpfile gulp.task('browserify', function() { bundle(false); }); gulp.task('browserify-watch', function() { bundle(true); }); function bundle (performWatch) { var bify = (performWatch === true ?…
Mike Fielden
  • 10,055
  • 14
  • 59
  • 99
1
2 3 4 5 6