-
Notifications
You must be signed in to change notification settings - Fork 21
/
Gruntfile.js
executable file
·59 lines (57 loc) · 1.84 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
module.exports = function(grunt){
grunt.initConfig({
cssmin: {
target: {
expand: true,
src: ['app/webroot/css/**/openslideshare*.css', '!*.min.css'],
dest: './',
ext: '.min.css'
}
},
csslint: {
strict: {
options: {
import: 2
},
src: ['app/webroot/css/**/openslideshare*.css', '!app/webroot/**/*.min.css']
},
lax: {
options: {
import: false
},
src: ['app/webroot/css/**/openslideshare*.css', '!app/webroot/**/*.min.css']
}
},
clean: ["app/tmp/logs/*", "app/reports/*", "!app/tmp/**/.gitkeep"],
shell: {
reloadx: {
command: './node_modules/.bin/livereloadx'
},
run_test: {
command: 'app/Console/cake test --log-junit app/reports/unittest.xml app AllTests'
},
run_test_full: {
command: 'app/Console/cake test --configuration=oss_phpunit.xml app AllTests'
},
run_phpcs: {
command: './Vendor/bin/phpcs app/**/*.php --standard=PSR2;:'
}
},
watch: {
css: {
files: ['app/webroot/css/**/*.css'],
tasks: ['cssmin']
},
script: {
files: ['app/webroot/js/**/*.js'],
tasks: ['uglify']
}
}
});
grunt.loadNpmTasks('grunt-contrib-watch');
grunt.loadNpmTasks('grunt-contrib-cssmin');
grunt.loadNpmTasks('grunt-contrib-csslint');
grunt.loadNpmTasks('grunt-contrib-clean');
grunt.loadNpmTasks('grunt-shell');
grunt.registerTask('default', ['watch']);
};