forked from alleyinteractive/wordpress-fieldmanager
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Gruntfile.js
57 lines (52 loc) · 1.1 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
module.exports = function( grunt ) {
if ( ! grunt.option( 'wp' ) ) {
grunt.option( 'wp', 'master' );
}
grunt.initConfig({
connect: {
server: {
options: {
base: '.'
}
}
},
qunit: {
options: {
timeout: 7000
},
latest: {
options: {
urls: ['http://localhost:8000/tests/js/index.html']
}
},
recent: {
options: {
urls: [
'http://localhost:8000/tests/js/index.html',
'http://localhost:8000/tests/js/index.html?wp=4.3',
'http://localhost:8000/tests/js/index.html?wp=4.2'
]
}
},
specific: {
options: {
urls: [ 'http://localhost:8000/tests/js/index.html?wp=' + grunt.option( 'wp' ) ]
}
}
},
phpcs: {
plugin: {
src: './'
},
options: {
bin: "vendor/bin/phpcs --extensions=php --ignore=\"*/vendor/*,*/node_modules/*,/*\"",
standard: "phpcs.ruleset.xml"
}
},
});
grunt.loadNpmTasks( 'grunt-contrib-connect' );
grunt.loadNpmTasks( 'grunt-contrib-qunit' );
grunt.loadNpmTasks( 'grunt-phpcs' );
grunt.task.run( 'connect' );
grunt.registerTask( 'default', ['qunit:latest'] );
};