-
Notifications
You must be signed in to change notification settings - Fork 0
/
gulpfile_config.js
87 lines (80 loc) · 2.21 KB
/
gulpfile_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
const OUT_DIR = './dist'
const config = {
css: {
admin_blocks: {
src: './src/core/framework-logic/scss/blocks-backend.scss',
dest: `${OUT_DIR}/global_admin`,
watch: [
'./src/core/framework-logic/scss/blocks-backend.scss',
'./src/core/framework-logic/scss/**/*.scss',
'./src/blocks/**/_editor.scss',
],
sourcemaps: './css-maps',
},
fe_blocks_shared: {
src: './src/blocks_shared_css_and_js/css/*.scss',
dest: `${OUT_DIR}/blocks-shared`,
watch: ['./src/blocks_shared_css_and_js/css/*.scss'],
sourcemaps: './css-maps',
rename: {
suffix: '.min',
},
},
fe_blocks_single: {
src: './src/blocks/**/frontend.scss',
dest: `${OUT_DIR}/block-specific`,
watch: ['./src/blocks/**/frontend.scss'],
sourcemaps: './css-maps',
rename: {
suffix: '.min',
},
},
},
js: {
fe_blocks_shared: {
src: './src/blocks_shared_css_and_js/js/*.js',
dest: './',
watch: ['./src/blocks_shared_css_and_js/js/*.js'],
outdir: `${OUT_DIR}/blocks-shared`,
rename: {
suffix: '.min',
},
},
fe_blocks_single: {
src: './src/blocks/**/frontend.js',
dest: './',
watch: ['./src/blocks/**/frontend.js'],
outdir: `${OUT_DIR}/block-specific`,
rename: {
suffix: '.min',
},
},
},
latte: {
watch: './**/*.latte',
},
}
const config_webpack_js_admin_blocks = {
watch: [
'./src/blocks.js',
'./src/register_block.js',
'./src/blocks/**/*.js',
'!./src/blocks/**/frontend.js', // Exclude frontend.js files
'!./src/blocks/**/frontend-js/*.js', // Exclude frontend.js files
'!./src/blocks/**/frontend-js/**/*.js', // Exclude frontend.js files
'./src/blocks_shared_css_and_js/**/*.js',
'./src/core/blocks_array.json',
'./src/core/framework-logic/components/**/*.js',
'./src/core/framework-logic/helpers/**/*.js',
'./src/blocks/**/model.json',
'./src/blocks/**/EditMain.js',
'./src/blocks/**/EditSidebar.js',
'./src/blocks/**/View.js',
],
}
// export default config
const compilation_config = {
config,
config_webpack_js_admin_blocks,
}
module.exports = compilation_config