-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathGruntfile.js
45 lines (39 loc) · 1007 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
36
37
38
39
40
41
42
43
44
module.exports = function(grunt) {
// Project configuration.
grunt.initConfig({
pkg: grunt.file.readJSON('package.json'),
uglify: {
options: {
},
build: {
src: 'js/*.js',
dest: 'dist/scripts.min.js'
}
},
cssmin: {
dist: {
options: {
processImport: false
},
files: {
'dist/style.min.css': ['css/*.css']
}
}
},
copy: {
main: {
files:[
// includes files within path
{expand: true, flatten: true, src: ['bower_components/**/dist/**/*.min.css'], dest: 'css/', filter: 'isFile'},
{expand: true, flatten: true, src: ['bower_components/**/dist/**/*.min.js'], dest: 'js/', filter: 'isFile'},
]
}
}
});
// Load the plugin that provides the "uglify" task.
grunt.loadNpmTasks('grunt-contrib-uglify');
grunt.loadNpmTasks('grunt-contrib-cssmin');
grunt.loadNpmTasks('grunt-contrib-copy');
// Default task(s).
grunt.registerTask('default', ['copy','uglify','cssmin']);
};