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

Added an option to allow users to turn mangling off #39

Closed
wants to merge 1 commit into from

Conversation

Fresheyeball
Copy link

    @options.mangle ?= true 

  if flags.minify
    if @concatCache[filePath]?.minifiedData
      result = @concatCache[filePath].minifiedData.toString 'utf8'
      concatenationChanged = false
    else
      result = minify concatenation, @options.mangle #argument passed to util for uglify
      @concatCache[filePath].minifiedData = new Buffer(result)

  minify = (js, mangle) ->
      jsp = uglify.parser
      pro = uglify.uglify
      ast = jsp.parse js
      ast = pro.ast_mangle ast if mangle #only mangle if option is true (default to true)
      ast = pro.ast_squeeze ast
      pro.gen_code ast

@Fresheyeball
Copy link
Author

Accept my pull request! I need this to complete my master plan of angular.js with snockets!

@ehg
Copy link

ehg commented Apr 22, 2013

I'd like this too.

@pthrasher
Copy link
Owner

Hey guys, I've just taken over maintenance on this repo. I've updated uglifyjs support to 2.0, and I think this is a good feature addition. I'm working on the next release (still quite a few bugs to fix) but the next release is also going to have source map support all the way to the concatenated file. This currently mostly works bug free, and the mangling in my code is currently off by default for the time being (I will turn this back on and make it an option when I release to NPM)... but in the mean time, feel free to pull the code from HEAD.

@Fresheyeball
Copy link
Author

I'm sorry, I don't understand. If I pull from head I will get the option of mangling? Or mangling off by default?

@pthrasher
Copy link
Owner

@Fresheyeball Right now it's off by default. I'm going to be pushing a number of changes over the next week. Stay tuned.

@pthrasher
Copy link
Owner

I've opened #43 for tracking my progress on 2.0.0. I plan to be done by the end of the month (may).

I'm closing this issue, and the 2.0.0 update will have this feature.

@pthrasher pthrasher closed this May 16, 2013
@Fresheyeball
Copy link
Author

@pthrasher rock on.

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

Successfully merging this pull request may close these issues.

3 participants