wp-blank-scripts 4.0.0-dev-2 → 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-2",
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,21 +150,20 @@ 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
156
  const adminScripts = glob.sync(path.join(sourcePath, 'admin', '*.js'));
172
-
173
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
 
176
- console.log(adminStyles);
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
+ });
177
167
 
178
168
  const blockJsonFiles = [];
179
169
 
@@ -220,7 +210,12 @@ function makeBaseConfig(options) {
220
210
  target: 'web',
221
211
  entry: {
222
212
  adminScripts: [...fxFiles.admin.js, ...blockJsonScripts, ...adminScripts],
223
- 'admin.style': [...fxFiles.admin.sass, ...blockJsonStyles, ...adminStyles],
213
+ 'admin.style': [
214
+ ...fxFiles.admin.sass,
215
+ ...blockJsonStyles,
216
+ ...adminComponentStyles,
217
+ ...adminStyles,
218
+ ],
224
219
  },
225
220
  output: {
226
221
  path: buildPath,