-
commandify::cmd
-
The command to be executed (only needed if not defined via
package.json
config).- Source:
-
commandify::dir
-
The directory in which the command is to be executed (only needed if not defined via
package.json
config).- Source:
-
commandify(file) → {TransformStream}
-
browserify transform which executes a shell command exactly once for every time the bundle is created.
The command can be configured
inside package.json
{ "browserify": { "transform": [ "commandify" ] }, "commandify": "make all" }
In this case the command is executed in the directory in which the
package.json
is defined.via environment variables:
COMMANDIFY_CMD='make all' COMMANDIFY_DIR='./compile' browserify main.js ....
directly on commandify when bundle step is JavaScript
commandify.cmd = 'make hello'; commandify.dir = __dirname + '/compile'; browserify() .require(require.resolve('./makeify/main.js'), { entry: true }) .bundle() .pipe(....);
Parameters:
Name Type Description file
string file whose content is to be transformed
Returns:
through stream
- Type
- TransformStream