-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathGruntfile.js
More file actions
44 lines (44 loc) · 1.49 KB
/
Gruntfile.js
File metadata and controls
44 lines (44 loc) · 1.49 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
module.exports = function (grunt) {
grunt.initConfig({
pkg: grunt.file.readJSON('package.json'),
less: {
development: {
options: {
paths: ['web/css']
},
files: {
'web/css/style.css': 'web/css/style.less'
}
}
},
concat: {
js: {
src: [
'web/js/views/*.js',
'web/js/*.js',
],
dest: 'dist/js/main.js'
}
},
copy: {
main: {
files: [
{expand: true, cwd: 'web/', src: ['fonts/*'], dest: 'dist/', filter: 'isFile'},
{expand: true, cwd: 'web/', src: ['css/*.css'], dest: 'dist/', filter: 'isFile'},
{expand: true, cwd: 'web/', src: ['js/libs/*'], dest: 'dist/', filter: 'isFile'},
{expand: true, cwd: 'web/', src: ['img/*'], dest: 'dist/', filter: 'isFile'},
{expand: true, cwd: 'web/', src: 'index.html', dest: 'dist/', expand: true},
],
},
},
watch: {
files: ['web/css/*.less'],
tasks: ['less']
}
});
grunt.loadNpmTasks('grunt-contrib-less');
grunt.loadNpmTasks('grunt-contrib-copy');
grunt.loadNpmTasks('grunt-contrib-concat');
grunt.loadNpmTasks('grunt-contrib-watch');
grunt.registerTask('default', ['less']);
};