This repository has been archived by the owner on Apr 28, 2022. It is now read-only.
forked from plentz/jquery-maskmoney
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Gruntfile.js
75 lines (72 loc) · 2.5 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
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
module.exports = function(grunt) {
"use strict";
grunt.initConfig({
pkg: grunt.file.readJSON("package.json"),
meta: {
banner: "/*\n" +
" * <%= pkg.title || pkg.name %> - v<%= pkg.version %>\n" +
" * <%= pkg.description %>\n" +
" * <%= pkg.homepage %>\n" +
" *\n" +
" * Made by <%= pkg.author.name %>\n" +
" * Under <%= pkg.licenses[0].type %> License (<%= pkg.licenses[0].url %>)\n" +
" */\n"
},
jshint: {
all: ["Gruntfile.js", "src/**/*.js", "test/**/*.js", "!test/util.js"],
options: {
jshintrc: true
}
},
concat: {
dist: {
src: ["src/jquery.maskMoney.js"],
dest: "dist/jquery.maskMoney.js"
},
options: {
banner: "<%= meta.banner %>"
}
},
uglify: {
options: {
banner: "<%= meta.banner %>",
mangle: {
except: ["jQuery", "$"]
}
},
build: {
files: [
{ src: "src/jquery.maskMoney.js", dest: "dist/jquery.maskMoney.min.js" },
]
}
},
qunit: {
all: ["test/*.html"]
},
jquerymanifest: {
options: {
source: grunt.file.readJSON("package.json"),
overrides: {
"name": "maskMoney",
"title": "jQuery maskMoney",
"download": "https://raw.github.com/plentz/jquery-maskmoney/master/dist/jquery.maskMoney.min.js",
"docs": "http://github.com/plentz/jquery-maskmoney",
"demo": "http://plentz.github.com/jquery-maskmoney",
"keywords": ["form", "input", "mask", "money"],
}
}
},
watch: {
files: ["test/*.html", "test/*.js", "src/*.js"],
tasks: ["jshint", "qunit"]
}
});
grunt.loadNpmTasks("grunt-contrib-concat");
grunt.loadNpmTasks("grunt-contrib-jshint");
grunt.loadNpmTasks("grunt-contrib-uglify");
grunt.loadNpmTasks("grunt-jquerymanifest");
grunt.loadNpmTasks("grunt-contrib-qunit");
grunt.loadNpmTasks("grunt-contrib-watch");
grunt.registerTask("test", ["jshint", "qunit"]);
grunt.registerTask("default", ["jshint", "qunit", "concat", "uglify", "jquerymanifest"]);
};