Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ES6 file loading support #137

Closed
jasonpang opened this issue Jun 26, 2016 · 2 comments
Closed

ES6 file loading support #137

jasonpang opened this issue Jun 26, 2016 · 2 comments

Comments

@jasonpang
Copy link

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!

@princejwesley
Copy link
Owner

princejwesley commented Jun 27, 2016

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

princejwesley added a commit that referenced this issue Jun 27, 2016
@princejwesley
Copy link
Owner

Fix is merged in master. Try and let me know. Use #131 to track this issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants