-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathGruntfile.js
50 lines (47 loc) · 1.6 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
module.exports = function (grunt) {
grunt.initConfig({
pkg: grunt.file.readJSON('package.json'),
less: {
default: {
options: {},
files: {
"build/css/styles.css": "src/lesscss/styles.less"
}
}
},
copy: {
default: {
files: [
{expand: true, cwd: 'src/img/', src: ['*'], dest: 'build/img/'},
{expand: true, cwd: 'src/img/favicon', src: ['*'], dest: 'build/img/favicon'},
{src: 'index.html', dest: 'build/index.html'}
]
}
},
cssmin: {
default: {
expand: true,
cwd: 'build/css/',
dest: 'build/css/',
src: ['*.css'],
ext: '.css'
}
},
uglify: {
default: {
files: [
{'build/js/bootstrap.min.js': 'node_modules/bootstrap/dist/js/bootstrap.js'},
{'build/js/jquery.min.js': 'node_modules/jquery/dist/jquery.js'},
{'build/js/angular.min.js': 'node_modules/angular/lib/angular.js'}
]
}
},
clean: ['build/']
});
grunt.loadNpmTasks('grunt-contrib-less');
grunt.loadNpmTasks('grunt-contrib-clean');
grunt.loadNpmTasks('grunt-contrib-copy');
grunt.loadNpmTasks('grunt-contrib-cssmin');
grunt.loadNpmTasks('grunt-contrib-uglify');
grunt.registerTask('default', ['clean', 'copy', 'less', 'cssmin', 'uglify']);
};