-
Notifications
You must be signed in to change notification settings - Fork 183
/
build-config.js
85 lines (85 loc) · 2.93 KB
/
build-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
module.exports = {
slug: 'siteorigin-panels',
jsMinSuffix: '.min',
version: {
src: [
'siteorigin-panels.php',
'readme.txt'
]
},
less: {
src: [
'css/**/*.less',
'!css/mixins.less',
'settings/**/*.less',
'!widgets/**/styles/*.less',
'!widgets/less/*.less'
],
include: [
'widgets/less'
]
},
sass: {
src: [],
include:[]
},
js: {
src: [
'compat/**/*.js',
'js/**/*.js',
'settings/**/*.js',
'widgets/**/*.js',
'!js/siteorigin-panels/**', // Ignore the SiteOrigin Panels JS, they're handled by Browserify
'!{tmp,tmp/**}' // Ignore tmp/ and contents
]
},
babel: {
src: [
'compat/**/*.jsx',
],
},
browserify : {
src: 'js/siteorigin-panels/main.js',
dest: 'js/',
fileName: 'siteorigin-panels.js',
watchFiles: [
'js/siteorigin-panels/**',
]
},
css: {
src: [
'css/**/*.css',
],
},
bust : {
src: [
'js/siteorigin-panels.js',
'js/styling.js',
]
},
copy: {
src: [
'**/!(*.js|*.jsx|*.less)', // Everything except .js/.jsx and .less files
'!{build,build/**}', // Ignore build/ and contents
'widgets/less/*.less', // LESS libraries used in runtime styles
'widgets/**/styles/*.less', // All the widgets' runtime .less files
'inc/installer/js/*js', // Include Installer JS.
'!widgets/**/styles/*.css', // Don't copy any .css files compiled from runtime .less files
'!{node_modules,node_modules/**}', // Ignore node_modules/ and contents
'!{tmp,tmp/**}', // Ignore dist/ and contents
'!siteorigin-panels.php', // Not the base plugin file. It is copied by the 'version' task.
'!package.json', // Ignore the package.json file..
'!readme.txt', // Not the readme.txt file. It is copied by the 'version' task.
'!readme.md', // Ignore the readme.md file. It is for the github repo.
'!{js/siteorigin-panels,js/siteorigin-panels/**}',
'!inc/installer/inc/github-plugin-updater.php', // Exclude Installer Standalone Updater.
]
},
i18n: {
src: [
'**/*.php', // All the PHP files.
'!tmp/**/*.php', // Ignore tmp/ and contents
'!dist/**/*.php' // Ignore dist/ and contents
],
},
};