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

Should sourceMappingURL comments be included in bower distributions? #200

Closed
nikz opened this issue Sep 16, 2015 · 10 comments
Closed

Should sourceMappingURL comments be included in bower distributions? #200

nikz opened this issue Sep 16, 2015 · 10 comments
Assignees
Labels

Comments

@nikz
Copy link

nikz commented Sep 16, 2015

Hi Team!

First off, thanks for Showdown - it's a really useful package. 👍

I'm having a bit of trouble when integrating the bower package into my workflow though, specifically with the sourceMappingURL comments (see my comment on the ember-cli-uglify package for more detail).

In short, the bower package doesn't include any of the src/ files, but the files in dist/ have generated source maps that point to those files (and the comments that in turn point to those map files).

Would you folks be open to a change to the gruntfile in order to not generate source maps when building a package for distribution? Or would you prefer an alternate solution?

Thanks!

Nik

@tivie
Copy link
Member

tivie commented Sep 20, 2015

Hey @nikz. Thank you for your kind words.

It seems the best way is not to include a src map for the concatenated files in the bower package (it does not make much sense since it points to non existent files).

The regular package would keep them.

@tivie tivie added the bug label Sep 20, 2015
@tivie tivie self-assigned this Sep 20, 2015
@nikz
Copy link
Author

nikz commented Sep 21, 2015

@tivie: OK, great - would you like me to make the grunt modifications to exclude the map files? I can potentially handle that. :)

@tivie
Copy link
Member

tivie commented Sep 21, 2015

@nikz No grunt modifications needed. The only thing needed is to make bower ignore map files. Although I'm kind of conflicted about it since map files are extremely useful for debugging.

@nikz
Copy link
Author

nikz commented Sep 21, 2015

@tivie definitely agree, but without the files in src they aren't so useful? So we should either exclude the map files or include the source files?

@tivie
Copy link
Member

tivie commented Oct 26, 2015

@nikz If we remove the map files from bower but keep the sourcemap comments, would it fix the problem?

@nikz
Copy link
Author

nikz commented Oct 28, 2015

@tivie I'm not 100% sure - I've just been removing the comments :) Let me give that a go today and get back to you?

@nikz
Copy link
Author

nikz commented Oct 28, 2015

@tivie I just end up getting a message like the following:

Warning: ignoring input sourcemap for bower_components/showdown/dist/showdown.js because ENOENT, no such file or directory '/Users/nik/Projects/gelato/ember/tmp/concat_with_maps-input_base_path-WJdhcaUE.tmp/0/bower_components/showdown/dist/showdown.js.map

But everything works! 👍

@tivie
Copy link
Member

tivie commented Jan 4, 2016

OK, so after some thought I think it might be better to include the src files in bower distributions. It increases download size a bit but, apart from that, I don't see any inconveniente.

@nikz What do you think?!

@nikz
Copy link
Author

nikz commented Jan 4, 2016

@tivie I think that would be fine, so long as they aren't getting built for distribution or anything like that. Means that the source map URLs have something to point to!

@tivie tivie closed this as completed in 9b5a233 Jun 21, 2016
@tivie
Copy link
Member

tivie commented Jun 21, 2016

Should be fixed now.

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

No branches or pull requests

2 participants