btford/ngmin

ngmin does not work on config calls

Closed this issue · 6 comments

I tryed your generator-angular project and noticed that the config call is not annotated. I already updated the ngmin dependency of grunt-ngmin to the latest version on github without success. I also saw that you already added config to your signature.js. The following code is not annotated (from your angular generator project):

angular.module('app', []).config(function ($routeProvider) {
  $routeProvider.when('/', {
    templateUrl: 'views/main.html',
    controller: 'MainCtrl'
  }).otherwise({ redirectTo: '/' });
});

Fixed in 6f096e0.

Thanks!

just saw this, I am assuming it is not on npm yet.

should be as v0.3.0.

On Fri, Mar 8, 2013 at 8:29 PM, Greg Weber notifications@github.com wrote:

just saw this, I am assuming it is not on npm yet.


Reply to this email directly or view it on GitHubhttps://github.com//issues/10#issuecomment-14655376
.

thanks, I think I was actually seeing the other issue I opened

Looks like this might've regressed with the move to astral? I'm not seeing my config vars get handled appropriately with ngmin 0.4.0

EDIT: also having trouble with directives. FWIW I'm using the pattern (due to coffeescript)

var m;
m = angular.module('whatever', [])
m.directive('something', function(injectable){
  ...
})

@joshsz I'm unable to reproduce this with ngmin 0.4.0:

$ node
> ngmin = require('ngmin')
{ annotate: [Function] }
> ngmin.annotate("var m; m = angular.module('whatever', []); m.directive('something', function(injectable){});")
'var m;\nm = angular.module(\'whatever\', []);\nm.directive(\'something\', [\n  \'injectable\',\n  function (injectable) {\n  }\n]);'