added --watch-delay

This commit is contained in:
Tobias Koppers 2012-05-12 17:30:41 +02:00
parent eb40c79e12
commit efe1e2f46c
3 changed files with 14 additions and 1 deletions

View File

@ -315,6 +315,7 @@ Options:
--alias Set a alias name for a module. ex. http=http-browserify [string]
--debug Prints debug info to output files [boolean] [default: false]
--watch Recompiles on changes (except loaders) [boolean] [default: false]
--watch-delay Timeout to wait for the last change [string]
--progress Displays a progress while compiling [boolean] [default: false]
```
@ -467,6 +468,10 @@ else `stats` as json:
}
```
### with grunt
see [grunt-webpack](https://github.com/sokra/grunt-webpack).
## Bonus features
### File hash

View File

@ -56,6 +56,10 @@ var argv = require("optimist")
.describe("watch", "Recompiles on changes (except loaders)")
.default("watch", false)
.string("watch-delay")
.describe("watch-delay", "Timeout to wait for the last change")
.default("watch", false)
.boolean("progress")
.describe("progress", "Displays a progress while compiling")
.default("progress", false)
@ -95,6 +99,10 @@ if(argv.watch) {
options.watch = true;
}
if(argv["watch-delay"]) {
options.watchDelay = parseInt(argv["watch-delay"], 10);
}
if(argv.filenames) {
options.includeFilenames = true;
}

View File

@ -1,6 +1,6 @@
{
"name": "webpack",
"version": "0.3.16",
"version": "0.3.17",
"author": "Tobias Koppers @sokra",
"description": "Packs CommonJs Modules for the browser. Allows to split your codebase into multiple bundles, which can be loaded on demand. Support loading of js, json, jade, coffee, css, ... out of the box and more with custom loaders.",
"dependencies": {