-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathwpgulp.config.js
168 lines (152 loc) · 3.52 KB
/
wpgulp.config.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
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
/**
* WPGulp Configuration File
*
* 1. Edit the variables as per your project requirements.
* 2. In paths you can add <<glob or array of globs>>.
*
* @package WPGulp
*/
// General options.
const projectURL = 'http://localhost/tmw-whatsapp';
const productURL = './';
const browserAutoOpen = false;
const injectChanges = true;
const outputStyle = 'compressed';
const errLogToConsole = true;
const precision = 10;
// Styles to process.
const styles = [
{
name: 'admin',
src: './assets/sass/admin/admin.scss',
destination: './assets/css/',
file: 'tmw-whatsapp-admin'
},
{
name: 'app',
src: './assets/sass/admin/app.scss',
destination: './assets/css/',
file: 'tmw-whatsapp-app'
},
{
name: 'wpbakery',
src: './assets/sass/admin/wpbakery.scss',
destination: './assets/css/',
file: 'tmw-whatsapp-wpbakery'
},
];
// Scripts to process.
const scripts = [
{
name: 'admin',
src: './assets/js/src/admin.js',
destination: './assets/js/',
file: 'tmw-whatsapp-admin',
},
{
name: 'app',
src: './assets/js/src/app.js',
destination: './assets/js/',
file: 'tmw-whatsapp-app',
},
{
name: 'widgets',
src: './assets/js/src/widgets.js',
destination: './assets/js/',
file: 'tmw-whatsapp-widgets',
},
];
// Watch options.
const watchStyles = './assets/sass/**/*.scss';
const watchScripts = './assets/js/src/**/*.js';
const watchPhp = './**/*.php';
// Zip options.
const zipName = 'tmwc-whatschat.zip';
const zipDestination = './../';
const zipIncludeGlob = ['../@(tmwc-whatschat)/**/*'];
const zipIgnoreGlob = [
'!**/*{node_modules,node_modules/**/*}',
'!**/*.git',
'!**/*.svn',
'!**/*.code-workspace',
'!**/*phpcs.xml',
'!**/*gulpfile.babel.js',
'!**/*wpgulp.config.js',
'!**/*.eslintrc.js',
'!**/*.eslintignore',
'!**/*.editorconfig',
'!**/*phpcs.xml.dist',
'!**/*vscode',
'!**/*package.json',
'!**/*package-lock.json',
'!**/*assets/img/raw/**/*',
'!**/*assets/img/raw',
'!**/*assets/js/src/**/*',
'!**/*assets/js/src',
'!**/*assets/sass/',
'!**/*assets/sass/**/*',
'!**/*phpcs.xml',
'!{vendor/bin,vendor/bin/**/*}',
'!{vendor/dealerdirect,vendor/dealerdirect/**/*}',
'!{vendor/phpcompatibility,vendor/phpcompatibility/**/*}',
'!{vendor/phpcsstandards,vendor/phpcsstandards/**/*}',
'!{vendor/squizlabs,vendor/squizlabs/**/*}',
'!{vendor/wp-coding-standards,vendor/wp-coding-standards/**/*}',
'!**/*.map',
'!**/*tests/**/*',
'!**/*tests',
'!**/*e2etests/**/*',
'!**/*e2etests',
'!**/*playwright-report/**/*',
'!**/*playwright-report',
'!**/*test-results/**/*',
'!**/*test-results',
'!**/*playwright.config.js',
'!{Design,Design/**/*}',
'!{Documentation,Documentation/**/*}',
'!**/*readme.md',
];
// Translation options.
const textDomain = 'tmw-whatsapp';
const translationFile = 'tmw-whatsapp.pot';
const translationDestination = './languages';
// Others.
const packageName = 'tmw-whatsapp';
const bugReport = 'https://github.com/maaprote/';
const lastTranslator = 'Rodrigo Teixeira';
const team = 'Rodrigo Teixeira';
const BROWSERS_LIST = ['last 2 version', '> 1%'];
// Export.
module.exports = {
// General options.
projectURL,
productURL,
browserAutoOpen,
injectChanges,
outputStyle,
errLogToConsole,
precision,
// Style options.
styles,
// Script options.
scripts,
// Watch options.
watchStyles,
watchScripts,
watchPhp,
// Zip options.
zipName,
zipDestination,
zipIncludeGlob,
zipIgnoreGlob,
// Translation options.
textDomain,
translationFile,
translationDestination,
// Others.
packageName,
bugReport,
lastTranslator,
team,
BROWSERS_LIST,
};