forked from jeffharrell/minicart
-
Notifications
You must be signed in to change notification settings - Fork 0
/
grunt.js
42 lines (35 loc) · 1012 Bytes
/
grunt.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
/*jshint node:true, browser:false */
var grunt = require('grunt'),
fs = require('fs'),
jshintOptions = JSON.parse(fs.readFileSync('./.jshintrc'));
module.exports = function (grunt) {
'use strict';
// Project configuration
grunt.initConfig({
pkg: '<json:package.json>',
meta: {
banner: "/*!\n * <%= pkg.name %>\n *\n * <%= pkg.description %>\n *\n * @version <%= pkg.version %> - <%= grunt.template.today('yyyy-mm-dd') %>\n * @author <%= pkg.author.name %> <<%= pkg.author.url %>>\n * @url <%= pkg.url %> \n * @license <<%= pkg.license %>>\n */"
},
lint: {
all: [ 'src/*.js', 'test/*.js' ]
},
jshint: {
options: jshintOptions
},
concat: {
dist: {
src: [ 'src/minicart.js', 'lib/json2.js' ],
dest: 'dist/minicart.js'
}
},
min: {
dist: {
src: [ '<banner:meta.banner>', 'src/minicart.js', 'lib/json2.js' ],
dest: 'dist/minicart.min.js'
}
}
});
// Tasks
grunt.registerTask('default', 'lint');
grunt.registerTask('dist', 'lint concat min');
};