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

Conditional comments around sourceUrl comment causing grey hair #7

Closed
nikcorg opened this issue Feb 18, 2014 · 3 comments
Closed

Conditional comments around sourceUrl comment causing grey hair #7

nikcorg opened this issue Feb 18, 2014 · 3 comments
Milestone

Comments

@nikcorg
Copy link

nikcorg commented Feb 18, 2014

Is there any chance Cajon would switch over to the //# sourceUrl= style of notation?

The conditional comments around the line which appends the magical //@ sourceURL= have a nasty habit of being stripped when passed through UglifyJS.

I attempted to solve the issue by rolling my own function for determining which comments to keep, but alas, the /*@end@*/ comment is ignored, apparently because there's no code following it in the block. If I add an executable line below the closing comment, it's passed into the preserve comment function for evaluation.

I do realise, that I should probably just change our development build to skip Cajon in the uglification process and just keep it as is, but I strive to having the build as similar as possible to minimise variables between environments.

@jrburke jrburke added this to the 0.1.14 milestone Feb 19, 2014
@nikcorg
Copy link
Author

nikcorg commented Feb 19, 2014

Thank you, sir 👍

@jrburke
Copy link
Member

jrburke commented Feb 19, 2014

No problem, thanks for the reminder, meant to change this earlier. If you get this file via npm, I'm having trouble publishing to npm. I think it worked, but npm seems to have had trouble in general today.

@nikcorg
Copy link
Author

nikcorg commented Feb 19, 2014

Nah, I'm pulling it in with Bower. Delivered all the way to Finland just fine. But I also checked the npm version. That worked, too.

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