jmdobry / angular-cache

angular-cache is a very useful replacement for the Angular 1 $cacheFactory.
http://jmdobry.github.io/angular-cache
MIT License
1.39k stars 156 forks source link

dist/angular-cache.js doesn't end with a semicolon #118

Closed scheffield closed 10 years ago

scheffield commented 10 years ago

Hi,

dist/angular-cache.js ends with

},{}]},{},[21])

If you concat multiple libraries the missing semicolon brakes the resulting js file.

jmdobry commented 10 years ago

I have been concatenating angular-cache with other files since angular-cache was created, and I have never had a problem. What concatenator are you using? This is surprising, since the semicolon is optional in JavaScript. I think perhaps the problem may be that there is no terminating newline character.

Try ensuring that there is a line break at that location in your concatenated file, see if that works.

scheffield commented 10 years ago

I'm using https://github.com/gruntjs/grunt-contrib-concat/tree/v0.4.0 for concatenation. This has an option to separate each file with a configured string. I could use this. But all other libraries I include are terminated by a ;. The version 2.3.7 of angular-cache also was terminated by a ; and worked very well.

Thanks for your help!