Example in readme is not windows compatible
Hypercubed opened this issue · comments
See https://github.com/bucaran/generator-rise/issues/10 and cloverfield-tools/cf-package#28
Specifically this line:
babel-node node_modules/.bin/isparta cover --report text --report html node_modules/.bin/_mocha -- --reporter dot
More details if needed. In some environments (maybe only windows) node_modules/.bin/isparta
is a bash file not a symlink. So this script is feeding a bash file to babel-node which obviously fails.
If you setup your script in your package.json scripts section then you can let npm decide how the node_modules script runs, which will run the one appropriate for your OS. Set it up like so:
{
"scripts": {
"cover": "isparta cover --report text --report html node_modules/.bin/_mocha -- --reporter dot"
}
}
No, I don't belive that will work. For one you have removed babel-node
which is needed to cover ES6 files. Two, node_modules/.bin/_mocha
is not a JavaScript file in windows. You need:
{
"scripts": {
"cover": "babel-node node_modules/isparta/bin/isparta cover --report text --report html node_modules/mocha/bin/_mocha -- --reporter dot"
}
}
Closes with #77