wp-blank-scripts 4.0.0-dev-1 → 4.0.0-dev-3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "wp-blank-scripts",
3
- "version": "4.0.0-dev-1",
3
+ "version": "4.0.0-dev-3",
4
4
  "description": "Personal Wordpress Scripts",
5
5
  "main": "index.js",
6
6
  "bin": {
@@ -139,15 +139,6 @@ function makeBaseConfig(options) {
139
139
  { from: 'wp-content', to: 'wp-content' },
140
140
  ];
141
141
 
142
- // @TODO: temporary for development of blocks package
143
- const includeBlocks = process.env.MASTER_BLOCKS;
144
- const masterBlocks = [
145
- {
146
- from: path.join(process.cwd(), 'vendor/vivo-digital/vivo-master-blocks/dist'),
147
- to: path.join(themePath, 'inc', 'vivo-master-blocks'),
148
- },
149
- ];
150
-
151
142
  let customFiles = [];
152
143
  if (typeof copyFiles === 'function') {
153
144
  customFiles = copyFiles({
@@ -159,20 +150,21 @@ function makeBaseConfig(options) {
159
150
  });
160
151
  }
161
152
 
162
- const filesToCopy = [
163
- ...sourceFiles,
164
- ...envFiles,
165
- ...wordpressFiles,
166
- ...customFiles,
167
- ...(includeBlocks ? masterBlocks : []),
168
- ];
153
+ const filesToCopy = [...sourceFiles, ...envFiles, ...wordpressFiles, ...customFiles];
169
154
 
170
155
  // Admin entries
171
- const adminScripts = glob.sync(path.join(sourcePath, 'assets', 'admin', '*.js'));
172
-
173
- const adminStyles = glob.sync(path.join(sourcePath, 'assets', 'admin', '*.scss'));
156
+ const adminScripts = glob.sync(path.join(sourcePath, 'admin', '*.js'));
157
+ const adminStyles = glob.sync(path.join(sourcePath, 'admin', '*.scss'));
174
158
  const mainStyleVariables = path.join(sourcePath, 'assets', 'css', 'utils', 'variables.scss'); //* Not sure if this is needed.
175
159
 
160
+ // @TODO: should these be importable into JSX bundle instead? 🤔
161
+ const adminComponentStyles = [];
162
+ glob
163
+ .sync(path.join(sourcePath, 'admin', 'components', '***', '*.{scss,css}'))
164
+ .forEach((filePath) => {
165
+ adminComponentStyles.push(filePath);
166
+ });
167
+
176
168
  const blockJsonFiles = [];
177
169
 
178
170
  glob.sync(path.join(sourcePath, 'blocks', '***', '*.json')).forEach((filePath) => {
@@ -218,7 +210,12 @@ function makeBaseConfig(options) {
218
210
  target: 'web',
219
211
  entry: {
220
212
  adminScripts: [...fxFiles.admin.js, ...blockJsonScripts, ...adminScripts],
221
- 'admin.style': [...fxFiles.admin.sass, ...blockJsonStyles, ...adminStyles],
213
+ 'admin.style': [
214
+ ...fxFiles.admin.sass,
215
+ ...blockJsonStyles,
216
+ ...adminComponentStyles,
217
+ ...adminStyles,
218
+ ],
222
219
  },
223
220
  output: {
224
221
  path: buildPath,