-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathGruntfile.js
44 lines (42 loc) · 1.21 KB
/
Gruntfile.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
43
44
module.exports = function(grunt){
grunt.initConfig({
pkg: grunt.file.readJSON('package.json'),
meta: {
banner: '/* <%= pkg.name %> - v<%= pkg.version %> - <%= pkg.homepage %> <%= grunt.template.today("mm/dd/yyyy hh:mm TT") %> */'
},
jshint: {
all: ['src/**/*.js'],
options: {
browser: true
}
},
concat: {
full: {
src: ["lib/underscore-1.3.3/underscore.js", "src/peggy.js", "src/scanner.js"],
dest: "dist/<%=pkg.name%>-full-<%=pkg.version%>.js"
},
no_underscore: {
src: ["src/peggy.js", "src/scanner.js"],
dest: "dist/<%=pkg.name%>-<%=pkg.version%>.js"
}
},
uglify: {
full: {
src: ["<banner>", "dist/<%=pkg.name%>-<%=pkg.version%>.js"],
dest: "dist/<%=pkg.name%>-full-<%=pkg.version%>.min.js"
},
no_underscore: {
src: ["<banner>", "dist/<%=pkg.name%>-<%=pkg.version%>-only-peggy.js"],
dest: "dist/<%=pkg.name%>-<%=pkg.version%>.min.js"
}
},
qunit: {
core: "tests/index.html"
}
});
grunt.loadNpmTasks('grunt-contrib-concat');
grunt.loadNpmTasks('grunt-contrib-jshint');
grunt.loadNpmTasks('grunt-contrib-qunit');
grunt.loadNpmTasks('grunt-contrib-uglify');
grunt.registerTask("default", ["jshint", "concat", "uglify", "qunit"]);
};