forked from jbillimoria/JavaScriptButtons
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathgrunt.js
More file actions
36 lines (30 loc) · 904 Bytes
/
grunt.js
File metadata and controls
36 lines (30 loc) · 904 Bytes
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
var grunt = require('grunt'),
fs = require('fs'),
jshintOptions = JSON.parse(fs.readFileSync('./.jshintrc'));
module.exports = function (grunt) {
// Project configuration.
grunt.initConfig({
pkg: '<json:package.json>',
meta: {
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 */"
},
lint: {
all: [ 'src/*.js', 'test/*.js' ]
},
jshint: {
options: jshintOptions
},
min: {
dist: {
src: [ '<banner:meta.banner>', 'src/paypal-button.js' ],
dest: 'dist/paypal-button.min.js'
},
bundled: {
src: [ '<banner:meta.banner>', 'lib/MiniCart/minicart.js', 'src/paypal-button.js' ],
dest: 'dist/paypal-button-minicart.min.js'
}
}
});
// Default task.
grunt.registerTask('default', 'min');
};