Closed brauliobo closed 9 years ago
I will check it today evening.
You can install babel via npm:
npm install babel
and next in bash:
export NODE_PATH=/directory/to/your/node_modules
@bjarosze execjs will use the system's node modules?
Execjs executes system command (node in this case), so I don't know reason why it shouldn't use system's modules (even if there is note in execjs FAQ that require is not available). I've tested it and looks it works.
ok, will try that soon, closing for now. thanks!
@bjarosze I have installed babel with npm install -g babel
and Error: Cannot find module 'babel'
is still returned. Should it be required on execjs?
I've pushed new version with option to set path to modules in config/application.rb
:
config.riot.node_paths << '/path/to/your/node_modules'
If you do not provide this config, gem will use global modules.
If a
<script type="es6">
tag is used, Riot will need Babel to work.