@@ -9,7 +9,7 @@ module.exports = function(grunt) {
9
9
// Default task.
10
10
grunt . registerTask ( 'default' , [ 'jshint' , 'karma:unit' ] ) ;
11
11
grunt . registerTask ( 'serve' , [ 'karma:continuous' , 'dist' , 'build:gh-pages' , 'connect:continuous' , 'watch' ] ) ;
12
- grunt . registerTask ( 'dist' , [ 'ngmin' , 'surround' , 'uglify' ] ) ;
12
+ grunt . registerTask ( 'dist' , [ 'ngmin' , 'surround:main ' , 'uglify' , 'surround:banner ' ] ) ;
13
13
grunt . registerTask ( 'coverage' , [ 'jshint' , 'karma:coverage' ] ) ;
14
14
grunt . registerTask ( 'junit' , [ 'jshint' , 'karma:junit' ] ) ;
15
15
@@ -141,16 +141,25 @@ module.exports = function(grunt) {
141
141
} ,
142
142
143
143
surround : {
144
- options : {
145
- prepend : [ '(function(window, angular, undefined) {' ,
146
- '\'use strict\';' ] . join ( '\n' ) ,
147
- append : '})(window, window.angular);'
148
- } ,
149
144
main : {
150
145
expand : true ,
151
146
cwd : 'src' ,
152
147
src : [ '*.js' ] ,
153
- dest : 'dist'
148
+ dest : 'dist' ,
149
+ options : {
150
+ prepend : [ '(function(window, angular, undefined) {' ,
151
+ '\'use strict\';' ] . join ( '\n' ) ,
152
+ append : '})(window, window.angular);'
153
+ }
154
+ } ,
155
+ banner : {
156
+ expand : true ,
157
+ cwd : 'dist' ,
158
+ src : [ '*.js' ] ,
159
+ dest : 'dist' ,
160
+ options : {
161
+ prepend : '<%= meta.banner %>'
162
+ }
154
163
}
155
164
} ,
156
165
0 commit comments