-
Notifications
You must be signed in to change notification settings - Fork 8
/
Copy pathGruntfile.js
102 lines (93 loc) · 2.15 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
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
/* global module, require */
module.exports = function( grunt ) {
'use strict';
// Load all grunt tasks
require('matchdep').filterDev('grunt-*').forEach(grunt.loadNpmTasks);
// Project configuration
grunt.initConfig( {
pkg: grunt.file.readJSON( 'package.json' ),
clean : {
dist: ['dist/']
},
copy: {
dist: {
files : [
{
expand: true,
src: [
'**',
'!dist/**',
'!assets-wp-repo/**',
'!code-coverage/**',
'!codeception.yml',
'!node_modules/**',
'!assets/vendor/**',
'assets/vendor/insertion-query/insQ.min.js',
'assets/vendor/jquery-ui/themes/base/jquery-ui.min.css',
'!assets/js/src/**',
'!assets/css/src/**',
'!Gruntfile.js',
'!bower.json',
'!package.json',
'!package-lock.json',
'!composer.json',
'!composer.lock',
'!phpcs.xml',
'!phpdoc.dist.xml',
'!phpunit.xml.dist',
'!bin/**',
'!tests/**',
'!.idea/**',
'!tags',
'!vendor/**',
"vendor/sudar/wp-system-info/**",
"vendor/collizo4sky/persist-admin-notices-dismissal/**"
],
dest: 'dist/'
}
]
},
jqueryUi: {
files: [
{
src : "node_modules/components-jqueryui/themes/base/jquery-ui.min.css",
dest: "assets/vendor/jquery-ui/themes/base/jquery-ui.min.css"
},
{
expand: true,
src: ["node_modules/components-jqueryui/themes/base/images/*"],
dest: "assets/vendor/jquery-ui/themes/base/images/",
flatten: true,
filter: "isFile"
}
]
},
insertionQ: {
files: [
{
src : "node_modules/insertion-query/insQ.min.js",
dest: "assets/vendor/insertion-query/insQ.min.js"
}
]
},
},
makepot: {
target: {
options: {
exclude: ['vendor/.*', 'dist/.*'],
updateTimestamp: false,
}
}
},
watch: {
all: {
files: ['**', '!dist/**'],
tasks: ['build']
}
}
} );
require('time-grunt')(grunt);
grunt.registerTask("vendor", ["copy:jqueryUi", "copy:insertionQ"]);
grunt.registerTask("build", ["vendor", "clean", "copy:dist"]);
grunt.util.linefeed = '\n';
};