-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathGruntfile.js
More file actions
51 lines (45 loc) · 1.04 KB
/
Gruntfile.js
File metadata and controls
51 lines (45 loc) · 1.04 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
45
46
47
48
49
50
51
/**
* Grunt configuration file.
*
* @package WordPoints_Dev_Lib
* @since 2.5.0
*/
/* jshint node:true */
module.exports = function( grunt ) {
var SOURCE_DIR = 'src/',
DEV_LIB_DIR = 'dev-lib/',
WORDPOINTS_DIR = process.env.WORDPOINTS_DIR;
// Load tasks.
require( 'matchdep' ).filterDev( 'grunt-*' ).forEach( grunt.loadNpmTasks );
grunt.loadTasks( DEV_LIB_DIR + 'grunt/tasks/' );
// Project configuration.
grunt.initConfig({
autoloader: {
all: {
src_dir: SOURCE_DIR,
dependencies: [ WORDPOINTS_DIR + 'src/classes/' ],
prefix: 'wordpoints_wpdatatables_'
}
},
watch: {
autoloader: {
files: [
SOURCE_DIR + '**/classes/**/*.php',
'!' + SOURCE_DIR + '**/classes/index.php'
],
tasks: ['autoloader'],
options: {
event: [ 'added', 'deleted' ]
}
},
// This triggers an automatic reload of the `watch` task.
config: {
files: 'Gruntfile.js',
tasks: ['build']
}
}
});
grunt.registerTask( 'build', ['autoloader'] );
grunt.registerTask( 'default', 'build' );
};
// EOF