-
Notifications
You must be signed in to change notification settings - Fork 13
/
Copy pathGruntfile.js
38 lines (37 loc) · 1.21 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
module.exports = function (grunt) {
var buildBanner = '/*\n\
* jQuery GrewForm Plugin v<%= pkg.version %>\n\
*\n\
* Copyright 2011-<%= grunt.template.today("yyyy") %>, Artem Suschev\n\
* Grandcapital Ltd.\n\
* Contributions: Andre_487 (https://github.com/Andre-487/)\n\
*\n\
* Licensed under the MIT license (license.txt)\n\
*/';
grunt.initConfig({
pkg: grunt.file.readJSON('package.json'),
uglify: {
options: {
banner: buildBanner,
sourceMap: true,
compress: {
drop_console: true
}
},
build: {
src: 'jquery.grewform.js',
dest: 'jquery.grewform.min.js',
'source-map': 'jquery.grewform.min.map'
}
}
});
grunt.loadNpmTasks('grunt-contrib-uglify');
grunt.registerTask('copy_compiled', function () {
var baseName = 'jquery.grewform.min.js',
srcFile = __dirname + '/' + baseName,
testFile = __dirname + '/tests/' + baseName;
grunt.file.copy(srcFile, testFile);
});
grunt.registerTask('minify', ['uglify', 'copy_compiled'])
grunt.registerTask('default', ['minify'])
};