-
Notifications
You must be signed in to change notification settings - Fork 12
/
gruntfile.js
62 lines (61 loc) · 1.57 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) {
require('jit-grunt')(grunt);
grunt.initConfig({
pkg: grunt.file.readJSON('package.json'),
concat: {
options: {
separator: ';'
},
dist: {
src: ['js/jquery.toggleText.js'
,'js/bootstrap-select.js'
,'js/phpList3ToBootstrap.js'
,'bootstrap/dist/js/bootstrap.min.js'
,'js/bootstrap-tagsinput.js'
,'js/bootstrap-dialog.js'
,'js/bootstrap-toggle.js'
,'js/phplist.js'],
dest: 'js/dist/<%= pkg.name %>.js'
}
},
uglify: {
options: {
banner: '/*! <%= pkg.name %> <%= grunt.template.today("dd-mm-yyyy") %> */\n'
},
dist: {
files: {
'js/dist/<%= pkg.name %>.min.js': ['<%= concat.dist.dest %>']
}
}
},
less: {
development: {
options: {
compress: true,
yuicompress: true,
optimization: 2
},
files: {
"css/style.css": "less/style.less" // destination file and source file
}
}
},
watch: {
styles: {
files: ['less/**/*.less'], // which files to watch
tasks: ['less'],
options: {
nospawn: true
}
}
}
});
grunt.loadNpmTasks('grunt-contrib-concat');
grunt.loadNpmTasks('grunt-contrib-uglify');
grunt.registerTask('mydefault', [
'less'
, 'watch'
, 'concat'
, 'uglify'
]);
};