forked from indrimuska/angular-selector
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Gruntfile.js
62 lines (58 loc) · 1.29 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
module.exports = function(grunt) {
// Load plugins
require('load-grunt-tasks')(grunt);
// Project configuration.
grunt.initConfig({
pkg: grunt.file.readJSON('package.json'),
bumpup: {
options: {
updateProps: {
pkg: 'package.json'
}
},
file: 'package.json'
},
copy: {
main: {
files: {
'dist/angular-selector.js': ['src/angular-selector.js'],
'dist/angular-selector.css': ['src/angular-selector.css']
}
}
},
uglify: {
options: {
banner: '/*! angular-selector - v<%= pkg.version %> - https://github.com/indrimuska/angular-selector - (c) 2015 Indri Muska - MIT */\n'
},
main: {
files: {
'dist/angular-selector.min.js': ['dist/angular-selector.js']
}
}
},
cssmin: {
options: {
shorthandCompacting: false,
roundingPrecision: -1
},
main: {
files: {
'dist/angular-selector.min.css': ['dist/angular-selector.css']
}
}
},
'sync-json': {
options: {
include: ['name', 'description', 'version']
},
bower: {
files: {
"bower.json": "package.json"
}
}
}
});
// Default tasks.
grunt.registerTask('default', ['copy', 'uglify', 'cssmin', 'sync-json']);
grunt.registerTask('update-patch', ['bumpup:patch', 'default']);
};