-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathGruntfile.js
55 lines (53 loc) · 1.67 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
module.exports = function (grunt) {
grunt.initConfig({
pkg: grunt.file.readJSON('package.json'),
bowercopy: {
options: {
destPrefix: 'web'
},
custom: {
options: {
destPrefix: 'web',
srcPrefix: 'app/Resources/public'
},
files: {
'assets/img': 'img'
}
}
},
copy: {
img: {
expand: true,
cwd: 'app/Resources/public/img/',
src: '**',
dest: 'web/assets/img'
}
},
less: {
css: {
files: {
"web/assets/css/main.css": "app/Resources/public/less/main.less"
}
}
},
watch: {
styles: {
files: ['app/Resources/public/less/*.less','app/Resources/public/less/themes/*.less'], // which files to watch
tasks: ['less'],
options: {
nospawn: true
}
},
livereload: {
// Here we watch the files the sass task will compile to
// These files are sent to the live reload server after sass compiles to them
options: { livereload: true },
files: ['app/Resources/**/*.*','app/Resources/**/**/*.*']
}
}
});
grunt.loadNpmTasks('grunt-contrib-copy');
grunt.loadNpmTasks('grunt-contrib-less');
grunt.loadNpmTasks('grunt-contrib-watch');
grunt.registerTask('default', ['copy','less','watch']);
};