Skip to content

Commit 6aaad4c

Browse files
committedJun 7, 2015
chore(dist): add version & license banner to dist files
1 parent 5b525e8 commit 6aaad4c

File tree

1 file changed

+16
-7
lines changed

1 file changed

+16
-7
lines changed
 

‎gruntFile.js

+16-7
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ module.exports = function(grunt) {
99
// Default task.
1010
grunt.registerTask('default', ['jshint', 'karma:unit']);
1111
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' ]);
1313
grunt.registerTask('coverage', ['jshint', 'karma:coverage']);
1414
grunt.registerTask('junit', ['jshint', 'karma:junit']);
1515

@@ -141,16 +141,25 @@ module.exports = function(grunt) {
141141
},
142142

143143
surround: {
144-
options: {
145-
prepend: ['(function(window, angular, undefined) {',
146-
'\'use strict\';'].join('\n'),
147-
append: '})(window, window.angular);'
148-
},
149144
main: {
150145
expand: true,
151146
cwd: 'src',
152147
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+
}
154163
}
155164
},
156165

0 commit comments

Comments
 (0)
Please sign in to comment.