Skip to content

Commit 026fd16

Browse files
committed
Fix uglify task
1 parent 8383d37 commit 026fd16

File tree

1 file changed

+15
-8
lines changed

1 file changed

+15
-8
lines changed

Gruntfile.js

Lines changed: 15 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -3,19 +3,23 @@ module.exports = function(grunt) {
33
grunt.initConfig({
44

55
// Meta informations
6-
pkg: '<json:package.json>',
6+
pkg: grunt.file.readJSON('package.json'),
77
meta: {
88
banner: '/*\n' +
99
' * <%= pkg.title || pkg.name %> - v<%= pkg.version %>\n' +
1010
' * <%= pkg.description %>\n' +
11-
' * <%= pkg.homepage %>\n\n' +
11+
' * <%= pkg.homepage %>\n' +
12+
' *\n' +
1213
' * Copyright (c) <%= grunt.template.today("yyyy") %>\n' +
1314
' * MIT License\n' +
14-
' */'
15-
},
15+
' */\n'
16+
},
1617
concat: {
18+
options: {
19+
banner: '<%= meta.banner %>'
20+
},
1721
dist: {
18-
src: ['<banner:meta.banner>', '<file_strip_banner:src/jquery.github.js>'],
22+
src: ['src/jquery.github.js'],
1923
dest: 'dist/jquery.github.js'
2024
}
2125
},
@@ -30,8 +34,11 @@ module.exports = function(grunt) {
3034

3135
// Minify definitions
3236
uglify: {
33-
dist: {
34-
src: ['<banner:meta.banner>', '<config:concat.dist.dest>'],
37+
options: {
38+
banner: '<%= meta.banner %>'
39+
},
40+
my_target: {
41+
src: ['dist/jquery.github.js'],
3542
dest: 'dist/jquery.github.min.js'
3643
}
3744
}
@@ -42,7 +49,7 @@ module.exports = function(grunt) {
4249
grunt.loadNpmTasks('grunt-contrib-jshint');
4350
grunt.loadNpmTasks('grunt-contrib-uglify');
4451

45-
grunt.registerTask('default', ['jshint', 'uglify', 'concat']);
52+
grunt.registerTask('default', ['jshint', 'concat', 'uglify']);
4653
grunt.registerTask('travis', ['jshint']);
4754

4855
};

0 commit comments

Comments
 (0)