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

Multiline dependency array parsing issue #8

Closed
zourtney opened this issue Feb 7, 2013 · 2 comments
Closed

Multiline dependency array parsing issue #8

zourtney opened this issue Feb 7, 2013 · 2 comments

Comments

@zourtney
Copy link

zourtney commented Feb 7, 2013

I'm observing cram erroring out on multiline dependency arrays like:

define([
  'secondary'
], function() {});

Cram produces an error such as:

cram failed:  ENOENT, open '/Library/WebServer/Documents/crambreak/
  secondary
.js'
Error: ENOENT, open '/Library/WebServer/Documents/crambreak/
  secondary
.js'

The whitespace in the error message makes it look like it's looking for linebreaks in the filename..?


Consider the following (contrived) example, for a more complete look:

index.html

<script src="../../curl/src/curl.js"></script>
<script>curl(['main']);</script>

main.js

define([
  'secondary'         // <-- cram does not like this
], function() {});

secondary.js

define('secondary', function() {});

Replace the dependency parameter with a single-line ['secondary'], ..., and cram behaves as expected. Of course, curl.js properly handles both situations.

@unscriptable
Copy link
Member

Thanks @zourtney! Fixing that now!

@zourtney
Copy link
Author

zourtney commented Feb 7, 2013

Great! Thanks for the quick fix!

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