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

Changed main module file to use un-minified version. #2109

Merged
merged 1 commit into from
Oct 21, 2013

Conversation

icetan
Copy link
Contributor

@icetan icetan commented Oct 20, 2013

This makes the debugging process easier and also makes it possible to choose your own minifier.

An alternative would be for the bulid.js script to have uglify-js output a source map file to the dist directory for the minified version.

This makes the debugging process easier and also makes it possible to choose your own minifier when using browserify or similar bundlers.
@danzel
Copy link
Member

danzel commented Oct 20, 2013

Do tools use this for setting up script tags in a page, or is it just used for nodejs?

If the first, a sourcemap may be better. Otherwise people will have their sites set up to use the uncompressed version?
If we could have a sourcemap that takes you back to the original files that'd be awesome :)

@icetan
Copy link
Contributor Author

icetan commented Oct 20, 2013

I don't think people use the main attribute in the package.json to include scripts through HTML script tags. If they are going to include scripts straight into the HTML they might as well copy the minified file and not use a package manager like NPM and the package.json file.

In my case I use browserify so I can use NPM and bundle all scripts to one file and use one minifier for the bundle.

The nice thing is that browserify/uglify-js can generate source maps for all required modules so I don't need to worry about every package having to supply one individually.

Generally it is a bit annoying when I debug a Node.js program and find that one of the modules have been minified, but that is sort of off topic because regular Node.js modules are not meant to run in a browser.

I guess pulling these changes does not mean a source map can't be supplied for those who want that too.

@danzel
Copy link
Member

danzel commented Oct 20, 2013

cool, seems reasonable to me then :)

@mourner
Copy link
Member

mourner commented Oct 21, 2013

Me too.

mourner added a commit that referenced this pull request Oct 21, 2013
Changed main module file to use un-minified version.
@mourner mourner merged commit 1e328b4 into Leaflet:master Oct 21, 2013
@icetan icetan deleted the patch-1 branch October 21, 2013 23:02
@icetan
Copy link
Contributor Author

icetan commented Oct 21, 2013

Smallest diff ever :). Thanks guys!

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

Successfully merging this pull request may close these issues.

3 participants