-
Notifications
You must be signed in to change notification settings - Fork 0
/
Gruntfile.js
48 lines (41 loc) · 1.04 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
let loadGruntConfig = require( "load-grunt-config" );
let timeGrunt = require( "time-grunt" );
let path = require( "path" );
const { flattenVersionForFile } = require( "./webpack/paths" );
module.exports = function( grunt ) {
timeGrunt( grunt );
const readPackageJson = grunt.file.readJSON( "package.json" );
const pluginVersion = readPackageJson.version;
let project = {
pluginMainFile: "fact-check-for-yoastseo.php",
pluginVersion: pluginVersion,
pluginSlug: "fact-check-for-yoastseo",
paths: {
get config() {
return this.grunt + "config/";
},
grunt: "grunt/",
js: "js/",
css: "css/",
},
files: {
js: [
"js/src/**/*.js",
],
php: [
"*.php",
],
phptests: "tests/**/*.php",
get config() {
return project.paths.config + "*.js";
},
grunt: "Gruntfile.js",
},
};
project.pluginVersionSlug = flattenVersionForFile( pluginVersion );
// Load Grunt configurations and tasks
loadGruntConfig( grunt, {
configPath: path.join( process.cwd(), project.paths.config ),
data: project,
} );
};