Skip to content

Commit 32c1686

Browse files
committed
Added Gruntfile.js (new in grunt 0.4)
1 parent b1c548a commit 32c1686

1 file changed

Lines changed: 41 additions & 0 deletions

File tree

Gruntfile.js

Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
module.exports = function (grunt) {
2+
3+
"use strict";
4+
5+
// Project configuration.
6+
grunt.initConfig({
7+
pkg: grunt.file.readJSON("package.json"),
8+
jshint: {
9+
all: {
10+
src: [ "src/*.js", "test/*.js" ],
11+
options: {
12+
jshintrc: ".jshintrc"
13+
}
14+
}
15+
},
16+
uglify: {
17+
dist: {
18+
src: [ "<banner:meta.banner>", "src/paypal-button.js" ],
19+
dest: "dist/paypal-button.min.js",
20+
options: {
21+
banner: "/*!\n * <%= pkg.name %>\n * <%= pkg.description %>\n * @version <%= pkg.version %> - <%= grunt.template.today(\'yyyy-mm-dd, h:MM:ss TT\') %>\n * @author <%= pkg.author.name %> <<%= pkg.author.url %>>\n */"
22+
}
23+
},
24+
bundled: {
25+
src: [ "<banner:meta.banner>", "lib/MiniCart/minicart.js", "src/paypal-button.js" ],
26+
dest: "dist/paypal-button-minicart.min.js",
27+
options: {
28+
banner: "/*!\n * <%= pkg.name %>\n * <%= pkg.description %>\n * @version <%= pkg.version %> - <%= grunt.template.today(\'yyyy-mm-dd, h:MM:ss TT\') %>\n * @author <%= pkg.author.name %> <<%= pkg.author.url %>>\n */"
29+
}
30+
}
31+
}
32+
});
33+
34+
// Load grunt tasks from npm packages
35+
grunt.loadNpmTasks("grunt-contrib-jshint");
36+
grunt.loadNpmTasks("grunt-contrib-uglify");
37+
38+
// Default task.
39+
grunt.registerTask("default", [ "uglify" ]);
40+
41+
};

0 commit comments

Comments
 (0)