-
-
Notifications
You must be signed in to change notification settings - Fork 1.4k
Minification is broken #483
Comments
There is the --minsafe flag which generates min safe files. Did you uncheck all the modules when setting up the project or did you leave them checked? What code did you add? |
I've unchecked all modules. But 'ngmin' was not in that modules list. Where can I add --minsafe in gruntfile.js to make it default behavior? |
ngmin is in the gruntfile automatically, whether you choose minsafe or not. Again, what changes did you make to the code? could you post it somewhere? |
https://gist.github.com/jamm/92620a57520ed4507170 - it's my gruntfile. |
And |
not your gruntfile, your actual code. The problem isnt in the gruntfile, its in the app code |
heh, no, there is nothing "unusual" in this small app. It's not my first app but it's first time when with generator-angular I have to use minsafe syntax. https://gist.github.com/jamm/6127fc2cd6a54c207c93 (without array-syntax minification doesn't work). app.js is very simple:
|
if thats your only file then ngmin should have worked out of the box |
For now, you have to pass --minsafe everytime you call |
strange enough way to response to issue ticket. "it should work. closed".
pff.. it's stupid. sorry, but it's really annoying. |
@Jamm If you can zip up your whole project and send it to me I'll test it and if I find its an actual bug I'll reopen this or fix the generator. If it's not a bug in the generator, I'll tell you whats wrong with your code so you can get back to being productive. If that's not being extra helpful, well there is only so much I can do. As to the minsafe option, here are my thoughts on that: #452 (comment). if it stays in, mabe it could be added to the config file I am working on (in my head at the moment) that stores this kind of stuff. |
https://dl.dropboxusercontent.com/u/63808427/find_card.7z it's full copy (without node_modules) of currently working app (some russian words in html - hope it's not a problem). App was for deadline "yesterday" - sorry for code. It's pretty small. |
I guess I should have looked closer at your gruntfile and saved us some time. You're ngmin was trying to operate on already minified files. https://gist.github.com/jamm/92620a57520ed4507170#file-gistfile1-txt-L227-L229 the cwd and dest should be |
Thank you very much. |
updated generator-angular today and after grunt-build my code threw "Unknown provider: aProvider <- a" error.
I'm making this app as fast as possible, so I just wrapped all dependencies in [], but I wonder - if there is some new option in Gruntfile which I should turn on to get safe-minimized (for angular) js code?
The text was updated successfully, but these errors were encountered: