Title: Grunt concut/uglify
Tags: javascript;angularjs;gruntjs;concat
Question: I'm getting rid with Grunt, Yeoman and Bower, and here are some simple questions I have:


Why yeoman generators run the grunt concat task before uglifying (since uglify knows how to concat)?
Why someone uses concat with cssmin and uglify in the project?
// 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

Comment: Thank you, 3rd is solved :)

Comment: Check ngmin https://github.com/btford/ngmin


Here is another answer: 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 jessicajohnson@example.org.


{'source': 'StackExchangeDataset', 'subset': 'stackoverflow.com', 'metadata': {'AnswerCount': 1, 'CommentCount': 2, 'ContentLicense': 'CC BY-SA 3.0', 'CreationDate': '2014:00:04/10/14', 'FavoriteCount': None, 'PostTypeId': 1, 'Tags': '<javascript><angularjs><gruntjs><concat>', 'Title': 'Grunt concut/uglify', 'ViewCount': 77, 'id': 22981325, 'user_AboutMe': '', 'user_AccountId': 2026092.0, 'user_DisplayName': 'Michael Malinovskij', 'user_Reputation': 1422.0, 'user_Views': 108.0, 'user_id': 1811043.0}}