Browserify plugin for kraken-devtools
Install:
$ npm install --save-dev kraken-devtools-browserify
Add:
"browserify": {
"module": "kraken-devtools-browserify",
"files": "/js/**/*.js"
}
to your kraken development configuration (config/development.json) under middleware.devtools.module[name=kraken-devtools].arguments.
Should look like this:
"middleware": { ... "devtools": { ... "module": { "name": "kraken-devtools", "arguments": [ ... { ... "css": { "module": "kraken-devtools/plugins/less", "files": "/css/**/*.css" }, "browserify": { "module": "kraken-devtools-browserify", "files": "/js/**/*.js" }, "copier": { "module": "kraken-devtools/plugins/copier", "files": "**/*" } } ] } } }
Type: [String]
or [[String, Object]]
Specifies a pipeline of modules through which the browserified bundle will be run. The transform is a string referring to a NPM module. The browserify docs themselves explain transform well, but below is an example of transform used with kraken-devtools-browserify
to automatically compile coffeescript files for use in a bundle:
"browserify": {
"module": "kraken-devtools-browserify",
"files": "/js/**/*.js",
"transform": ["coffeeify"]
}
Transforms can also be provided with an options hash; in this case, the transform should be specified as an array of [transformStringOrFn, optionsHash]
.