forked from recurser/jquery-simple-color
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Gruntfile.js
35 lines (29 loc) · 964 Bytes
/
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
module.exports = function(grunt) {
grunt.initConfig({
meta: {
date: (new Date()).toUTCString()
},
pkg: grunt.file.readJSON('package.json'),
uglify: {
dist: {
src: 'jquery.simple-color.js',
dest: 'jquery.simple-color.min.js'
}
}
});
grunt.registerTask('build', function() {
var content = grunt.file.read('src/jquery.simple-color.js', 'utf-8');
var output = grunt.template.process(content);
grunt.file.write('jquery.simple-color.js', output);
grunt.log.ok('File jquery.simple-color.js created.');
});
// update bower version
grunt.registerTask('bower', function() {
var pkg = grunt.file.readJSON('package.json');
var bower = grunt.file.readJSON('bower.json');
bower.version = pkg.version;
grunt.file.write('bower.json', JSON.stringify(bower, null, 2));
});
grunt.registerTask('default', ['build', 'uglify']);
grunt.loadNpmTasks('grunt-contrib-uglify');
};