This repository has been archived by the owner on Jun 16, 2022. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathgruntfile.js
66 lines (64 loc) · 1.83 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
56
57
58
59
60
61
62
63
64
65
66
module.exports = function (grunt) {
require('jit-grunt')(grunt)({
pluginsRoot: 'node_modules'
});
grunt.initConfig({
less: {
development: {
options: {
compress: false,
yuicompress: false,
optimization: 2
},
files: {
"www/styles/styles.css": "www/styles/less/main.less" // destination file and source file
}
}
},
nodestatic: {
server: {
options: {
dev: true,
verbose: false,
port: 8888,
base: '.'
}
}
},
watch: {
styles: {
files: ['www/styles/less/**/*.less'], // which files to watch
tasks: ['less'],
options: {
nospawn: true
}
}
},
composer: {
options: {
usePhp: false,
phpArgs: {},
flags: [],
cwd: 'api/v1',
composerLocation: '/usr/bin/composer'
},
some_target: {}
},
bower: {
install: {
options: {
targetDir: 'www/bower_components',
layout: 'byType',
install: true,
verbose: false,
cleanTargetDir: false,
cleanBowerDir: false,
bowerOptions: {}
}
}
}
});
grunt.registerTask('init', ['composer', 'bower', 'less']);
grunt.registerTask('default', ['less', 'nodestatic', 'watch']);
grunt.registerTask('styles', ['less', 'watch']);
};