Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/latentflip/watchify-server
https://github.com/latentflip/watchify-server
Last synced: 30 days ago
JSON representation
- Host: GitHub
- URL: https://github.com/latentflip/watchify-server
- Owner: latentflip
- Created: 2014-12-16T14:53:20.000Z (almost 10 years ago)
- Default Branch: master
- Last Pushed: 2014-12-17T18:07:51.000Z (almost 10 years ago)
- Last Synced: 2024-04-15T02:17:52.696Z (7 months ago)
- Language: JavaScript
- Size: 117 KB
- Stars: 1
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
I've just hacked together a little idea that I'd love to get thoughts/feedback on.
The make + browserify experience leads a little to be desired. The main issue is that browserify builds can get slow: on my machine, talky builds can be anywhere from 4 seconds to 16 seconds (pushing towards the latter as running multiple webrtc tabs just kills everything.
Watchify makes browserify builds better, by running a hot-process that rebuilds on demand and only rebuilds changed files; but it's not particularly compatible with make, and it only really suitable for development rather than production builds.
So I've written watchify-server (https://github.com/latentflip/watchify-server) as an attempt to combine the best of both worlds.
Out of the box, the watchify-server command is exactly the same as running browserify (it just forwards the args through to browserify):
However, run it like `watchify-server --spawn ` and it will spin up a watchify process behind a unix socket, and future calls to `watchify-server` will communicate with that process to grab a live bundle, which will be much faster than starting from scratch.
I believe this gives us the best of both worlds. Production builds will work just as usual. But as a dev you can optionally spawn a watchify server and see ~5 times faster browserify builds.