summaryrefslogtreecommitdiffstats
path: root/Gruntfile.js
diff options
context:
space:
mode:
authorkpdecker <kpdecker@gmail.com>2013-11-03 22:01:12 -0600
committerkpdecker <kpdecker@gmail.com>2013-11-03 22:01:12 -0600
commit79fe7afb656178b01ed5fe9aee7fc7a4a28ee3e6 (patch)
tree79c276101b13aac13de880ea235cf8052c7f853f /Gruntfile.js
parent29e3858d217c1ce4552e91f3f85a0fad39697259 (diff)
downloadhandlebars.js-79fe7afb656178b01ed5fe9aee7fc7a4a28ee3e6.zip
handlebars.js-79fe7afb656178b01ed5fe9aee7fc7a4a28ee3e6.tar.gz
handlebars.js-79fe7afb656178b01ed5fe9aee7fc7a4a28ee3e6.tar.bz2
Fix license output on combined artifacts
Diffstat (limited to 'Gruntfile.js')
-rw-r--r--Gruntfile.js13
1 files changed, 12 insertions, 1 deletions
diff --git a/Gruntfile.js b/Gruntfile.js
index 6f41596..4fe9b05 100644
--- a/Gruntfile.js
+++ b/Gruntfile.js
@@ -18,6 +18,17 @@ module.exports = function(grunt) {
clean: ["dist", "lib/handlebars/compiler/parser.js"],
copy: {
+ dist: {
+ options: {
+ processContent: function(content, path) {
+ return grunt.template.process('/*!\n\n <%= pkg.name %> v<%= pkg.version %>\n\n<%= grunt.file.read("LICENSE") %>\n@license\n*/\n')
+ + content;
+ }
+ },
+ files: [
+ {expand: true, cwd: 'dist/', src: ['*.js'], dest: 'dist/'}
+ ]
+ },
cdnjs: {
files: [
{expand: true, cwd: 'dist/', src: ['*.js'], dest: 'dist/cdnjs'}
@@ -119,7 +130,7 @@ module.exports = function(grunt) {
this.registerTask('node', ['transpile:cjs']);
this.registerTask('globals', ['packager-fork']);
- this.registerTask('release', 'Build final packages', ['amd', 'uglify', 'copy:components', 'copy:cdnjs']);
+ this.registerTask('release', 'Build final packages', ['amd', 'uglify', 'copy:dist', 'copy:components', 'copy:cdnjs']);
// Load tasks from npm
grunt.loadNpmTasks('grunt-contrib-clean');