Skip to content

Commit 16f0f61

Browse files
committed
added minify task
1 parent 3473ea5 commit 16f0f61

File tree

1 file changed

+30
-2
lines changed

1 file changed

+30
-2
lines changed

grunt.js

Lines changed: 30 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,45 @@
11
module.exports = function(grunt) {
22

33
grunt.initConfig({
4+
5+
// Meta informations
6+
pkg: '<json:package.json>',
7+
meta: {
8+
banner: '/*\n' +
9+
' * <%= pkg.title || pkg.name %> - v<%= pkg.version %>\n' +
10+
' * <%= pkg.description %>\n' +
11+
' * <%= pkg.homepage %>\n\n' +
12+
' * Copyright (c) <%= grunt.template.today("yyyy") %>\n' +
13+
' * MIT License\n' +
14+
' */'
15+
},
16+
concat: {
17+
dist: {
18+
src: ['<banner:meta.banner>', '<file_strip_banner:src/jquery.github.js>'],
19+
dest: 'dist/jquery.github.js'
20+
}
21+
},
22+
23+
// Lint definitions
424
lint: {
5-
files: ['jquery.github.js']
25+
files: ['src/jquery.github.js']
626
},
727
jshint: {
828
options: {
929
multistr: true
1030
}
31+
},
32+
33+
// Minify definitions
34+
min: {
35+
dist: {
36+
src: ['<banner:meta.banner>', '<config:concat.dist.dest>'],
37+
dest: 'dist/jquery.github.min.js'
38+
}
1139
}
1240
});
1341

14-
grunt.registerTask('default', 'lint');
42+
grunt.registerTask('default', 'lint min concat');
1543
grunt.registerTask('travis', 'lint');
1644

1745
};

0 commit comments

Comments
 (0)