-
Notifications
You must be signed in to change notification settings - Fork 42
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
Support minification of $routeProvider resolve functions #35
Comments
+1; I'm currently re-writing ngmin to use Astral, but this will be the next feature I add. |
I just realised this myself about 30 mins ago and had to change all of our resolve functions heh. @btford, thanks a ton for your work on this, I really appreciate it 👍 |
That would be dope for "any" resolve actually! (I'm using ui-router and $stateProvider for my routes) |
+1 |
2 similar comments
+1 |
+1 |
Added a test here: https://github.com/btford/ngmin/blob/master/test/route-provider.js#L24 If you have any other cases, please send a PR. Implementation to follow soon. |
Closed via btford/astral-angular-annotate@e157310 Reinstall ngmin to get the latest relevant dependency with the fix. |
@btford Is this worthy of a up-rev? That way we can just update from bower. ❓ |
You don't update |
Eak, npm even :/ On Tue, Jul 2, 2013 at 4:47 PM, Brian Ford [email protected]
|
If you update via |
The test you referred to (https://github.com/btford/ngmin/blob/master/test/route-provider.js#L24) does not handle resolve functions. I have added an example of (a failing) test case: |
@btford And I remember what I meant now, grunt-ngmin is currently pulling ngmin in for me, however it's pulling in v0.4.0 which obviously doesn't have this fix (as yet). Is it possible we could have an interim update to grunt-ngmin? |
I could do with this |
There is no support for the resolve object. I added it to the astral annotations. |
This issue does not seem to be fixed yet. See #35 (comment) |
It isn't. It only works for inline controller definition as shown in the tests. |
Are there plans for solving this or including your pull request? |
I haven't get any feedback yet. But you can use my fork and install it via the git url. |
Thank you. I have added your fork to my npm dependencies and it solves the |
+1. Please fix this. This is completely stopping us from a production build. |
You do know that you can add the annotation yourself, right? There's no reason this should ever hold up anything. |
@mboudreau For now modify your
and your problems are solved until the fix is validated and accepted by @btford. |
I tried that without success. It seems that the dependency doesn't seem to
|
Uninstall |
Awesome. Let me try that. Thanks bud.
|
Yeah, no dice, still not working even after uninstall, re-installing On Thu, Sep 26, 2013 at 9:00 PM, Michel Boudreau
"If at first you don't succeed, use a bigger hammer." - Unofficial motto of |
To confirm, when this lands, will it support ui-router |
+1 |
@tlvince I don't think so. You will need to add your own annotation rules. I think the best way would be a plugable annotation system, cause there are many more places where you need this stuff. |
Is it already implemented in some unreleased version of ngmin or astral-angular-annotate? |
@szimek add the dependency manually to your dependency list. Then ngmin will pick up the new one. |
I think the main release this doesn't get resolved is that the annotation system needs to be more adaptable. There are so many other libraries out there that would benefit from annotation support e.g. ui-router. So ngmin should not be responsible for the minification support for all the libraries but should offer an extensible system. |
@mlegenhausen I can agree with it, but it would be also great if the current non-extensible version of ngmin supported at least pure angular out of the box. It's already fixed and only a matter of merging a PR and releasing a new version. It doesn't conflict in any way with rewriting ngmin to support some kind of plugin system in the future. |
Cause Making ngmin extensible shouldn't be a big problem. Maybe I find some time to solve this. |
Right, I forgot |
Done. Look at my pull request #61 and vote for it ;) |
…ngmin#89, btford/ngmin#87, btford/ngmin#85, btford/ngmin#78, btford/ngmin#77, btford/ngmin#73, btford/ngmin#70, btford/ngmin#64, btford/ngmin#63, btford/ngmin#61, btford/ngmin#59, btford/ngmin#57, btford/ngmin#56, btford/ngmin#54, btford/ngmin#50, btford/ngmin#46, btford/ngmin#43, btford/ngmin#42, btford/ngmin#37, btford/ngmin#35, btford/ngmin#22
Please try https://github.com/olov/ng-annotate. ngmin is now deprecated: #93 If your issue isn't resolved there please open an issue at https://github.com/olov/ng-annotate/issues If you really want ngmin to fix this issue, feel free to fork it and use that. |
At the moment the only part of my code that doesn't minify properly are my resolve functions in my $routeProvider.when() statements.
It would be nice to see these supported. 👍
The text was updated successfully, but these errors were encountered: