Skip to content

Commit

Permalink
Use banner
Browse files Browse the repository at this point in the history
  • Loading branch information
nervo committed Jun 28, 2015
1 parent 3e81c7d commit e2bc08a
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 3 deletions.
24 changes: 21 additions & 3 deletions Gruntfile.js
Original file line number Diff line number Diff line change
Expand Up @@ -154,7 +154,25 @@ module.exports = function(grunt) {
}
},

usebanner: {
dist: {
options: {
banner: '<%= banner %>',
linebreak: false
},
files: {
src: [
'dist/<%= pkg.name %>.js',
'dist/assets/*.css'
]
}
}
},

uglify: {
options: {
banner: '<%= banner %>'
},
dist: {
files: {
'dist/<%= pkg.name %>.min.js': '<%= app.src.scripts %>'
Expand Down Expand Up @@ -237,15 +255,15 @@ module.exports = function(grunt) {
},
sassDist: {
files: [ 'src/**/*.scss' ],
tasks: [ 'sass:dist', 'concat:dist', 'cssmin:dist', 'copy:themes','copy:distToDocs' ]
tasks: [ 'sass:dist', 'concat:dist', 'cssmin:dist', 'copy:themes','usebanner:dist', 'copy:distToDocs' ]
},
jsDocs: {
files: [ '<%= app.docs.src %>/assets/**/*.js' ],
tasks: [ 'copy:docsAssets' ]
},
js: {
files: [ 'src/**/*.js' ],
tasks: [ 'jscs:dist', 'jshint:dist', 'qunit:dist', 'uglify:dist', 'concat:dist', 'copy:distToDocs', 'copy:srcToDocs' ]
tasks: [ 'jscs:dist', 'jshint:dist', 'qunit:dist', 'uglify:dist', 'concat:dist', 'usebanner:dist', 'copy:distToDocs', 'copy:srcToDocs' ]
},
helpers: {
files: [ '<%= app.src %>/helpers/*.js' ],
Expand Down Expand Up @@ -284,7 +302,7 @@ module.exports = function(grunt) {
grunt.loadNpmTasks('assemble');

// tasks
grunt.registerTask('dist', [ 'clean:dist', 'sass:dist', 'concat:dist', 'cssmin:dist', 'copy:themes', 'copy:distImages', 'jscs:dist', 'uglify:dist', 'copy:readme' ]);
grunt.registerTask('dist', [ 'clean:dist', 'sass:dist', 'concat:dist', 'cssmin:dist', 'copy:themes', 'copy:distImages', 'jscs:dist', 'usebanner:dist', 'uglify:dist', 'copy:readme' ]);

grunt.registerTask('docs', [ 'dist', 'clean:docs', 'assemble', 'sass:docs', 'copy:docsAssets', 'copy:distToDocs', 'zip' ]);

Expand Down
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@
"grunt-gh-pages": "^0.10.0",
"grunt-jscs-checker": "~0.4.2",
"grunt-sass": "^0.18.1",
"grunt-banner": "^0.4.0",
"load-grunt-tasks": "^0.4.0",
"pretty": "^0.1.2"
},
Expand Down

0 comments on commit e2bc08a

Please sign in to comment.