Skip to content

Commit ae1081a

Browse files
committed
Add Gruntfile to configure minifying
Adresses #219
1 parent 66e6820 commit ae1081a

File tree

1 file changed

+46
-0
lines changed

1 file changed

+46
-0
lines changed

Gruntfile.js

+46
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
1+
'use strict';
2+
3+
module.exports = function(grunt) {
4+
5+
// Get devDependencies
6+
require('load-grunt-tasks')(grunt, {scope: 'devDependencies'});
7+
8+
// Displays the execution time of grunt tasks
9+
require('time-grunt')(grunt);
10+
11+
// Config
12+
grunt.initConfig({
13+
pkg: grunt.file.readJSON('package.json'),
14+
15+
// uglify
16+
uglify: {
17+
options: {
18+
sourceMap: true,
19+
compress: {
20+
drop_console: true,
21+
drop_debugger: true
22+
},
23+
banner: '/* <%= pkg.title %> - v<%= pkg.version %>\n' +
24+
' * Copyright ©<%= grunt.template.today("yyyy") %> Mathias Bynens\n' +
25+
' * <%= grunt.template.today("yyyy-mm-dd") %>\n' +
26+
' */'
27+
},
28+
minify : {
29+
files: {
30+
'jquery.placeholder.min.js': ['jquery.placeholder.js']
31+
}
32+
}
33+
}
34+
35+
});
36+
37+
/**
38+
* Register own tasks by putting together existing ones
39+
*/
40+
41+
// Default task
42+
grunt.registerTask('default',
43+
['uglify']
44+
);
45+
46+
};

0 commit comments

Comments
 (0)