ES6 file loading support
jasonpang opened this issue · 2 comments
I'm trying to have Mancy load my ES6 project so that I can use it as an interactive REPL console.
Using the latest version of Mancy, tried to start it with the path option as described in some of the issues here:
mancy -p /Users/jpang/code/project
However, loading files relative to my project like:
import './script.js'
Returned a not found.
.require('./script.js')
Returned a not found as well.
I was able to load simple scripts using .load /Users/jpang/code/project/script.js
.
However when trying to load the ES6 -> ES5 version of my script which loads my entire project:
.load /Users/jpang/code/project/script.transpiled.js
There are thousands of errors. Sometimes there are errors in the "md5" module within Mancy's node_modules folder. Sometimes I get an alert dialog telling me "id" was undefined in Mancy's index or init script.
Mancy looks like a seriously awesome editor, but I had a lot of trouble figuring out some of the options and still can't seem to load my project's script into Mancy.
My script calls:
import './models/users.js'
import 'sequelize'
So I want to be able to make live DB queries in the REPL console. But I can't figure out any way to get it to work. I can provide any details if that would help the issue, thanks so much for all your hard work on this fantastic project!
Duplicate of #131
Sorry for the pain! I'll fix it this week and let you know.
For the time being, pass absolute path to require
or import
Fix is merged in master. Try and let me know. Use #131 to track this issue.