wp-blank-scripts 4.0.0-dev-6 → 4.0.0-dev-8

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-6",
3
+ "version": "4.0.0-dev-8",
4
4
  "description": "Personal Wordpress Scripts",
5
5
  "main": "index.js",
6
6
  "bin": {
@@ -67,6 +67,13 @@ function makeBaseConfig(options) {
67
67
  ignore: ['.DS_Store'],
68
68
  },
69
69
  },
70
+ {
71
+ from: path.join(sourceDir, 'parts'),
72
+ to: path.join(themePath, 'parts'),
73
+ globOptions: {
74
+ ignore: ['.DS_Store'],
75
+ },
76
+ },
70
77
  // Blocks
71
78
  // @TODO, copy the blocks into their own folders
72
79
  {
@@ -37,6 +37,19 @@ function makeWpWebpackConfig() {
37
37
  }
38
38
  });
39
39
 
40
+ const partsStyles = [];
41
+ const partsScripts = [];
42
+
43
+ // Front end component scripts
44
+ glob.sync(path.join(sourcePath, 'parts', '***', '*.js')).forEach((filePath) => {
45
+ partsScripts.push(filePath);
46
+ });
47
+
48
+ // Front end component styles
49
+ glob.sync(path.join(sourcePath, 'parts', '***', '*.{scss,css}')).forEach((filePath) => {
50
+ partsStyles.push(filePath);
51
+ });
52
+
40
53
  const entryScript = glob.sync(path.join(sourcePath, 'index.js'));
41
54
 
42
55
  if (!entryScript) {
@@ -48,8 +61,8 @@ function makeWpWebpackConfig() {
48
61
 
49
62
  return {
50
63
  entry: {
51
- main: [...blockJsonScripts, ...entryScript],
52
- style: [...blockJsonStyles, ...mainStyles],
64
+ main: [...blockJsonScripts, ...partsScripts, ...entryScript],
65
+ style: [...blockJsonStyles, ...partsStyles, ...mainStyles],
53
66
  },
54
67
  plugins: [
55
68
  new MiniCssExtractPlugin({