-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathGruntfile.js
More file actions
47 lines (44 loc) · 1.8 KB
/
Gruntfile.js
File metadata and controls
47 lines (44 loc) · 1.8 KB
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
module.exports = function(grunt) {
grunt.loadNpmTasks("grunt-contrib-concat");
grunt.loadNpmTasks('grunt-contrib-uglify');
grunt.loadNpmTasks('grunt-contrib-cssmin');
grunt.loadNpmTasks('grunt-contrib-copy');
grunt.initConfig({
concat: {
dist: {
src: ["site/src/js/*.js"],
dest: "site/res/js/app.js"
},
dist2: {
src: ["site/src/css/*.css"],
dest: "site/res/css/style.css"
}
},
uglify: {
bundle: {
files: {'site/res/js/app.min.js': 'site/res/js/app.js'}
}
},
cssmin: {
minify: {
src: 'site/res/css/style.css',
dest: 'site/res/css/style.min.css'
}
},
copy: {
files: {
cwd: 'site', // set working folder / root to copy
src: ['*.html','*.php'], // copy all files and subfolders **with ending .html**
dest: 'site/res', // destination folder
expand: true // required when using cwd
},
files2: {
cwd: 'site/brick', // set working folder / root to copy
src: ['*.html','*.php'], // copy all files and subfolders **with ending .html**
dest: 'site/res/brick', // destination folder
expand: true // required when using cwd
}
}
});
grunt.registerTask('default', ['concat', 'uglify:bundle','cssmin:minify','copy']);
};