forked from digitalBush/jquery.maskedinput
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathgruntfile.js
More file actions
75 lines (72 loc) · 2.41 KB
/
gruntfile.js
File metadata and controls
75 lines (72 loc) · 2.41 KB
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'),
banner: '/*\n'+
' <%= pkg.description %>\n'+
' Copyright (c) 2007 - <%= grunt.template.today("yyyy") %> <%= pkg.author %>\n'+
' Licensed under the MIT license (http://digitalbush.com/projects/masked-input-plugin/#license)\n'+
' Version: <%= pkg.version %>\n'+
'*/\n\n',
concat: {
options: {
banner: '<%= banner %>',
stripBanners: false
},
dist: {
src: ['src/jquery.maskedinput.js','src/masks/*.js'],
dest: 'dist/<%= pkg.name %>.js'
}
},
uglify: {
options: {
banner: '<%= banner %>'
},
dist: {
files: {
'dist/<%= pkg.name %>.min.js': ['<%= concat.dist.dest %>']
}
}
},
jasmine: {
full: {
src: '<%= concat.dist.src %>',
options: {
specs: 'spec/*[S|s]pec.js',
vendor: [
'lib/jquery-1.9.0.min.js',
'spec/lib/matchers.js',
'spec/lib/jasmine-species/jasmine-grammar.js',
'spec/lib/setup.js',
'spec/lib/jquery.keymasher.js'
]
}
}
},
jshint: {
src: {
options: {
jshintrc: 'src/.jshintrc'
},
src: '<%= concat.dist.src %>'
},
specs: {
options: {
jshintrc: 'spec/.jshintrc'
},
src: ['<%= jasmine.full.options.specs %>']
}
},
watch: {
files: ['<%= jshint.files %>'],
tasks: ['jshint', 'jasmine']
}
});
grunt.loadNpmTasks('grunt-contrib-uglify');
grunt.loadNpmTasks('grunt-contrib-jshint');
grunt.loadNpmTasks('grunt-contrib-jasmine');
grunt.loadNpmTasks('grunt-contrib-watch');
grunt.loadNpmTasks('grunt-contrib-concat');
grunt.registerTask('test', ['jshint', 'jasmine']);
grunt.registerTask('default', ['jshint', 'jasmine', 'concat', 'uglify']);
};