Skip to content
This repository was archived by the owner on Sep 8, 2020. It is now read-only.

chore(dist): add version & license banner to dist files #367

Merged
merged 1 commit into from
Jun 7, 2015
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
23 changes: 16 additions & 7 deletions gruntFile.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ module.exports = function(grunt) {
// Default task.
grunt.registerTask('default', ['jshint', 'karma:unit']);
grunt.registerTask('serve', ['karma:continuous', 'dist', 'build:gh-pages', 'connect:continuous', 'watch']);
grunt.registerTask('dist', ['ngmin', 'surround', 'uglify' ]);
grunt.registerTask('dist', ['ngmin', 'surround:main', 'uglify', 'surround:banner' ]);
grunt.registerTask('coverage', ['jshint', 'karma:coverage']);
grunt.registerTask('junit', ['jshint', 'karma:junit']);

Expand Down Expand Up @@ -141,16 +141,25 @@ module.exports = function(grunt) {
},

surround: {
options: {
prepend: ['(function(window, angular, undefined) {',
'\'use strict\';'].join('\n'),
append: '})(window, window.angular);'
},
main: {
expand: true,
cwd: 'src',
src: ['*.js'],
dest: 'dist'
dest: 'dist',
options: {
prepend: ['(function(window, angular, undefined) {',
'\'use strict\';'].join('\n'),
append: '})(window, window.angular);'
}
},
banner: {
expand: true,
cwd: 'dist',
src: ['*.js'],
dest: 'dist',
options: {
prepend: '<%= meta.banner %>'
}
}
},

Expand Down