CodeSleeve / asset-pipeline

This Laravel 4 package provides a very simple and easy to use asset pipeline. It was heavily inspired by the Rails asset pipeline. We make use of the wonderful Assetic package to help with pre-compliation!
http://www.codesleeve.com
MIT License
491 stars 53 forks source link

Word 'delete' breaks minification in JS #144

Closed jamesblackwell closed 10 years ago

jamesblackwell commented 10 years ago

For some reason, when I use the word 'delete' in my JS the minification breaks:

delete: function(id, successCallBack) {
                return $http.delete(baseUrl + 'saved/' + id)

Changing both of instances and it's fine.

kdocki commented 10 years ago

@jamesblackwell yep, we are looking into different minifiers... this is a known issue.

If you use 'new' it will break too. It is because delete and new are special words in javascript and the minifier apparently is choking on them when you use them as function names.

kdocki commented 10 years ago

Closing this question. Also opened up a proposal for new minifiers.