forked from nk-crew/awb
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathwpeg.config.js
60 lines (48 loc) · 1.7 KB
/
wpeg.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
const pkg = require( 'json-file' ).read( './package.json' ).data;
const cfg = {};
// Build Paths.
cfg.src = './src';
cfg.dist_root = './dist';
cfg.dist = '{dist_root}/advanced-backgrounds';
// Template variables that will be automatically replaced.
cfg.template_files_src = '{dist}/**/*.{md,php,js,css,pot}';
cfg.template_files_variables = {
text_domain: pkg.name,
plugin_version: pkg.version,
plugin_name: pkg.name,
plugin_title: pkg.title,
plugin_author: pkg.author,
};
// Copy files.
cfg.copy_files_src = [ '{src}/**/*', '!{src}/**/*.{js,scss}', '{src}/**/vendor/**/*.{js,scss}' ];
// Compile SCSS files.
cfg.compile_scss_files_src = [ '{src}/*assets/**/*.scss' ];
// Compile JS files.
cfg.compile_js_files_src = [
'{src}/*assets/awb/awb.js',
'{src}/*assets/admin/settings/script.js',
'{src}/*assets/admin/tinymce/mce-awb-attach-image.js',
'{src}/*assets/admin/tinymce/mce-awb-attach-video.js',
'{src}/*assets/admin/tinymce/mce-button.js',
'{src}/*assets/admin/tinymce/mce-localize.js',
'{src}/*assets/admin/vc_extend/vc-awb-attach-video.js',
'{src}/*assets/admin/vc_extend/vc-awb-frontend.js',
'{src}/*assets/admin/gutenberg/index.js',
];
// Correct line endings files.
cfg.correct_line_endings_files_src = '{dist}/**/*.{js,css}';
// ZIP files.
cfg.zip_files = [
{
src: '{dist}/**/*',
src_opts: {
base: '{dist_root}',
},
dist: '{dist_root}/advanced-backgrounds.zip',
},
];
// Watch files.
cfg.watch_files = [ '{src}/**/*', '!{src}/**/*.{js,scss}' ];
cfg.watch_js_files = [ '{src}/**/*.js', '{src}/assets/gutenberg/**/*.scss', '!{src}/*vendor/**/*' ];
cfg.watch_scss_files = '{src}/**/*.scss';
module.exports = cfg;