-
Notifications
You must be signed in to change notification settings - Fork 6
/
Copy pathGruntfile.js
67 lines (64 loc) · 2.03 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
module.exports = function(grunt) {
grunt.initConfig({
pkg: grunt.file.readJSON('selectlist.jquery.json'),
uglify: {
min: {
options: {
banner: '/*! <%= pkg.name %> <%= pkg.version %> */ '
},
files: {
'jquery.<%= pkg.name %>.min.js':
[ 'jquery.<%= pkg.name %>.dev.js' ]
}
},
plain: {
options: {
beautify: true,
mangle: false,
preserveComments: 'some'
},
files: {
'jquery.<%= pkg.name %>.js':
[ 'jquery.<%= pkg.name %>.dev.js' ]
}
}
},
copy: {
dist: {
files: [
{
expand: true, cwd: 'distfiles/', src: [ '**' ],
dest: 'dist/jquery.<%= pkg.name %>-<%= pkg.version %>/'
},
{
src: [ 'jquery.<%= pkg.name %>*.js' ],
dest: 'dist/jquery.<%= pkg.name %>-<%= pkg.version %>/scripts/'
}
]
}
},
qunit: {
all: [ 'test/*.html' ]
},
compress: {
dist: {
options: {
archive: 'dist/jquery.<%= pkg.name %>-<%= pkg.version %>.zip'
},
files: [{
expand: true,
cwd: 'dist/',
src: 'jquery.<%= pkg.name %>-<%= pkg.version %>/**',
dest: ''
}]
}
}
});
// Load the plugins
grunt.loadNpmTasks('grunt-contrib-compress');
grunt.loadNpmTasks('grunt-contrib-copy');
grunt.loadNpmTasks('grunt-contrib-qunit');
grunt.loadNpmTasks('grunt-contrib-uglify');
// Default tasks
grunt.registerTask('default', [ 'uglify', 'copy' ]);
};