-
Notifications
You must be signed in to change notification settings - Fork 0
/
wpgulp.config.js
172 lines (139 loc) · 4.2 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
169
170
171
172
/**
* 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
*/
// Project options.
// Local project URL of your already running WordPress site.
// > Could be something like "wpgulp.local" or "localhost"
// > depending upon your local WordPress setup.
const projectURL = 'localhost:10033';
// Theme/Plugin URL. Leave it like it is; since our gulpfile.js lives in the root folder.
const productURL = './';
const browserAutoOpen = false;
const injectChanges = true;
// >>>>> Style options.
// Path to main .scss file.
const styleSRC = './scss/main.scss';
// Path to place the compiled CSS file. Default set to root folder.
const styleDestination = './css/';
// Available options → 'compact' or 'compressed' or 'nested' or 'expanded'
const outputStyle = 'expanded';
const errLogToConsole = true;
const precision = 10;
// JS Vendor options.
// Path to JS vendor folder.
const jsVendorSRC = './assets/js/vendor/*.js';
// Path to place the compiled JS vendors file.
const jsVendorDestination = './assets/js/';
// Compiled JS vendors file name. Default set to vendors i.e. vendors.js.
const jsVendorFile = 'vendor';
// JS Custom options.
// Path to JS custom scripts folder.
const jsCustomSRC = './assets/js/custom/*.js';
// Path to place the compiled JS custom scripts file.
const jsCustomDestination = './assets/js/';
// Compiled JS custom file name. Default set to custom i.e. custom.js.
const jsCustomFile = 'custom';
// Images options.
// Source folder of images which should be optimized and watched.
// > You can also specify types e.g. raw/**.{png,jpg,gif} in the glob.
const imgSRC = './assets/img/raw/**/*';
// Destination folder of optimized images.
// > Must be different from the imagesSRC folder.
const imgDST = './assets/img/';
// >>>>> Watch files paths.
// Path to all *.scss files inside css folder and inside them.
const watchStyles = './scss/**';
// Path to all vendor JS files.
const watchJsVendor = './assets/js/vendor/*.js';
// Path to all custom JS files.
const watchJsCustom = './assets/js/custom/*.js';
// Path to all PHP files.
const watchPhp = './**/*.php';
// >>>>> Zip file config.
// Must have.zip at the end.
const zipName = 'theme.zip';
// Must be a folder outside of the zip folder.
const zipDestination = './../'; // Default: Parent folder.
const zipIncludeGlob = ['./**/*']; // Default: Include all files/folders in current directory.
// Default ignored files and folders for the zip file.
const zipIgnoreGlob = [
'!./{node_modules,node_modules/**/*}',
'!./.git',
'!./.svn',
'!./gulpfile.babel.js',
'!./wpgulp.config.js',
'!./.eslintrc.js',
'!./.eslintignore',
'!./.editorconfig',
'!./phpcs.xml.dist',
'!./vscode',
'!./package.json',
'!./package-lock.json',
'!./assets/css/**/*',
'!./assets/css',
'!./assets/img/raw/**/*',
'!./assets/img/raw',
`!${imgSRC}`,
`!${styleSRC}`,
`!${jsCustomSRC}`,
`!${jsVendorSRC}`
];
// >>>>> Translation options.
// Your text domain here.
const textDomain = 'WPGULP';
// Name of the translation file.
const translationFile = 'WPGULP.pot';
// Where to save the translation files.
const translationDestination = './languages';
// Package name.
const packageName = 'WPGULP';
// Where can users report bugs.
const bugReport = 'https://AhmadAwais.com/contact/';
// Last translator Email ID.
const lastTranslator = 'Ahmad Awais <[email protected]>';
// Team's Email ID.
const team = 'AhmadAwais <[email protected]>';
// Browsers you care about for auto-prefixing. Browserlist https://github.com/ai/browserslist
// The following list is set as per WordPress requirements. Though; Feel free to change.
const BROWSERS_LIST = ['last 2 version', '> 1%'];
// Export.
module.exports = {
projectURL,
productURL,
browserAutoOpen,
injectChanges,
styleSRC,
styleDestination,
outputStyle,
errLogToConsole,
precision,
jsVendorSRC,
jsVendorDestination,
jsVendorFile,
jsCustomSRC,
jsCustomDestination,
jsCustomFile,
imgSRC,
imgDST,
watchStyles,
watchJsVendor,
watchJsCustom,
watchPhp,
zipName,
zipDestination,
zipIncludeGlob,
zipIgnoreGlob,
textDomain,
translationFile,
translationDestination,
packageName,
bugReport,
lastTranslator,
team,
BROWSERS_LIST
};