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

Preserve leading license comments from multiple files; //, /* and /*! #379

Closed
wants to merge 9 commits into from

Conversation

mal
Copy link
Contributor

@mal mal commented Apr 25, 2012

Allows a user to specify more than one input file to uglify, and keep the comments from each; - can also be used to ask uglify to read input from stdin. This operates in a similar manner to the current bin/uglify in that it will only preserve the comment block at the top of each file.

Example

$ uglifyjs jquery.js myapp.js
/*! jQuery v1.7.2 jquery.com | jquery.org/license */ [uglified jquery code]
// leading comment in myapp.js
[uglified myapp code]

Changes

  • change: can supply multiple inputs
  • change: --define accepts regular expressions
  • new: --strict applies strict mode to output
  • fix: documentation layout - bug/fix

Note

This does not solve the problem being addressed in #332, it just improves the existing workaround in bin/uglifyjs.

@mal
Copy link
Contributor Author

mal commented May 4, 2012

@mishoo any pointers for getting this merged would be most welcome; I know it doesn't solve the comment/license situation completely, but it is a step up from what we have to help bridge the gap until there's a comprehensive solution/2.0.

mal and others added 2 commits May 5, 2012 22:49
I just discovered a bug in npm where a space between the `#!` and the `/usr/bin/env` is
causing it to not realize that this is a node program when it's installing on windows.

As a result, it doesn't set up the batch file properly.

I'm fixing the bug in npm, but it would be very helpful if you could remove the space here,
and republish as soon as you get a chance.  Thanks!
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.

2 participants