Closed SteveALee closed 8 years ago
PS the reason I tried this was I have a custom HTML I want to use which was not working with cat
. So tried with working javascript first
PPS The readme says you need to provide /recorder.js in a custom html but as far as I can see this is injected anyway.
ah, my bad. I was not quoting things correctly.
FYI I am using this in a npm script but as npm always runs cmd
on windows I have to prefix with bash -c
. But I forgot pipes require the command string to quoted thus:
"test": "bash -c \"cat index.html | browser-run --input html -p 8080\"",
I won't close in case you wanted to respond to the PS and PPS
Rats, now I get Syntax errors "unexpected identifier" in reporter.h
when using Chrome
if (old) old.apply(console, arguments);
seems to be the apply which should be ok. Time to debug.
Ah it turns out to be 'not supported' being returned by the embedded server for my globally included scripts in a /src folder. Setting the --static
option to . fixed that. Would probably be a sensible default.
I'm on windows but using git for windows bash
While
browserify -t babelify src/test.js | browser-run -p 8080
works just fineDoes not. neither does
$ browser-run -p 8080 < lib/script-compiled.js
I can't figure why this strange behaviour might be happening