-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathgulpfile.js
More file actions
50 lines (48 loc) · 1.14 KB
/
gulpfile.js
File metadata and controls
50 lines (48 loc) · 1.14 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
const gulp = require('gulp');
const zip = require('gulp-zip');
/**
* Zip task - Creates a distribution package of the plugin
* Excludes development files and includes only production-ready files
*/
function zipTask() {
return gulp.src([
'**/*',
'!node_modules/**',
'!**/node_modules/**',
'!src/**',
'!**/src/**',
'!.git/**',
'!.gitignore',
'!gulpfile.js',
'!package.json',
'!**/package.json',
'!package-lock.json',
'!**/package-lock.json',
'!yarn.lock',
'!**/yarn.lock',
'!*.zip',
'!.DS_Store',
'!Thumbs.db',
'!.vscode/**',
'!.idea/**',
'!*.log',
'!.env*',
'!composer.json',
'!composer.lock',
'!phpunit.xml*',
'!tests/**',
'!.phpcs.xml*',
'!.eslintrc*',
'!.prettierrc*',
'!webpack.config.js',
'!**/webpack.config.js'
], {
base: '.',
dot: false
})
.pipe(zip('d5-extension-example-modals.zip'))
.pipe(gulp.dest('.'));
}
// Export tasks
exports.zip = zipTask;
exports.default = zipTask;