gordon
gordon copied to clipboard
when using babel for es6, what's the recommended way to get node_modules into _build?
In the simple es6 example, the settings.yml
build: TARGET={target} npm run build
and the build script is as follows:
"build": "babel *.js --out-dir $TARGET"
This doesn't take into account node_modules. I've added some additional dependencies that I need to be included in node_modules in the _build directory. What's the recommended approach to do this?
Thanks!
And actually, since Node 4.3.2 supports es6, the babel transpilation shouldn't be necessary. I tried removing the custom npm run build
, but gordon build
just hangs.
I ran into this problem and solved it with this hack babel code.js lib/*.js --out-dir $TARGET && cp -a node_modules $TARGET
It feels a bit dirty though.. Since it copies the node_modules/.bin/
folder and also all devDependencies
.