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

Fails on transforming path-based require calls #2

Closed
RReverser opened this issue Oct 13, 2013 · 7 comments
Closed

Fails on transforming path-based require calls #2

RReverser opened this issue Oct 13, 2013 · 7 comments
Assignees

Comments

@RReverser
Copy link

require('./folder/file') is transformed to var folder/file = ... which causes syntax error.

@gfranko
Copy link
Owner

gfranko commented Oct 13, 2013

How would you like these path-based calls to be normalized?

@ghost ghost assigned gfranko Oct 13, 2013
@RReverser
Copy link
Author

Doesn't matter, but needs to be checked for no-conflicts with other names. How about folder__file?

@gfranko
Copy link
Owner

gfranko commented Oct 14, 2013

I'm thinking that the module name should just be converted to the actual name of the file. For example:

path name: ../modules/thirdModule

module name: thirdModule

Does that work for you?

@RReverser
Copy link
Author

Then, modules from different folders but with same names, won't work.

gfranko added a commit that referenced this issue Oct 14, 2013
@gfranko
Copy link
Owner

gfranko commented Oct 14, 2013

Could you grab the latest dev branch code and let me know if it fixes the relative file path issue?

I am now using this format:

path name: ../modules/thirdModule

module name: modules_thirdModule

@RReverser
Copy link
Author

Pretty sure it should, but I can't test until #3 is fixed.

@gfranko
Copy link
Owner

gfranko commented Oct 14, 2013

This should now be fixed in the 0.2.3 release.

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

No branches or pull requests

2 participants