Closed serapath closed 7 years ago
Ok, i figured out it works (...don't know if in general) if I prefix the command with a |
character, so:
"scripts": {
"watch": "watchify src/index.js -o '| npm run postprocess'",
"postprocess": "tee > bundle.js",
"build": "browserify src/index.js | npm run postprocess"
}
makes npm run watch
work as expected
How to pipe watchify?
browserify src/index.js > bundle.js
, worksbrowserify src/index.js | tee > bundle.js
, worksnpm run build
worksnpm run watch
doesnt work - but why?It seems to be interpreted as a file name instead of a command. How can I prevent that? Is that maybe an issue for:
also: it throws sometimes when plugins/transforms are involved.
I'm using
browserify-reload
anduglifyify
plugin for browserify/watchifyWith other plugins/transforms i sometimes get another proble, when I'm specifying a command instead of a filename in watchifies
-o '...'
option.e.g.
watchify... -o 'ecorcism ....'
is not a valid filename.How can i debug that? Is this easy to fix? Am I doing something wrong?