0
votes

I'm getting rid with Grunt, Yeoman and Bower, and here are some simple questions I have:

  1. Why yeoman generators run the grunt concat task before uglifying (since uglify knows how to concat)?
  2. Why someone uses concat with cssmin and uglify in the project?
  3. // Is there any grunt plugin for angular js to convert this:

    angular.module('MyApp')
       .controller('searchResultsCtrl', function($scope, $filter, $rootScope, $stateParams {...});
    

into this:

angular.module('MyApp')
    .controller('searchResultsCtrl', ['$scope', '$filter', '$rootScope', '$stateParams',  function($scope, $filter, $rootScope, $stateParams) {...}]);

Thanks

1
Thank you, 3rd is solved :) - Michael Malinovskij

1 Answers

1
votes

Concat is used for joining multiple files into one. It is used where you want all your javascripts or stylesheets to be joined into one file to decrease the number of requests made by browser.

Uglify minimizes javascript and css generally by remove redundant spaces and newlines, deleting comments and renaming variables to something shorter. The focus is to minimize the size of a file as much as possible.

Your problem with angular bindings can be solved by ngmin project. Take a look at it.