@caweb/cli 1.3.14 → 1.3.16

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.
@@ -74,6 +74,10 @@ baseConfig.module.rules.forEach((rule, i) => {
74
74
  baseConfig.module.rules[i].generator = {
75
75
  filename: 'fonts/[name][ext]'
76
76
  };
77
+
78
+ // we don't care who the issuer is
79
+ delete baseConfig.module.rules[i].issuer;
80
+
77
81
  }
78
82
  }
79
83
  })
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@caweb/cli",
3
- "version": "1.3.14",
3
+ "version": "1.3.16",
4
4
  "description": "CAWebPublishing Command Line Interface.",
5
5
  "exports": "./lib/env.js",
6
6
  "type": "module",
@@ -16,6 +16,14 @@ import { __ } from '@wordpress/i18n';
16
16
  */
17
17
  import { useBlockProps, RichText, InnerBlocks } from '@wordpress/block-editor';
18
18
 
19
+ /**
20
+ * This package includes a library of generic WordPress components to be used for creating
21
+ * common UI elements shared between screens and features of the WordPress dashboard.
22
+ *
23
+ * @see https://developer.wordpress.org/block-editor/reference-guides/packages/packages-components/
24
+ */
25
+ import { Button } from '@wordpress/components';
26
+
19
27
  /**
20
28
  * Lets webpack process CSS, SASS or SCSS files referenced in JavaScript files.
21
29
  * Those files can contain any CSS code that gets applied to the editor.
@@ -2,18 +2,17 @@
2
2
  * External dependencies
3
3
  */
4
4
  const { join } = require( 'path' );
5
- const { capitalCase } = require( 'change-case' );
6
5
 
7
6
  /**
8
7
  * Internal dependencies
9
8
  */
10
9
  const blockSlug = process.argv[ 2 ];
11
- const blockSlugTitle = capitalCase( blockSlug );
10
+ const blockSlugTitle = blockSlug.charAt(0).toUpperCase() + blockSlug.substring(1);
12
11
 
13
12
  const customScripts = {};
14
13
 
15
14
  const npmDependencies = [
16
- '@wordpress/icons@9.45.0'
15
+ '@wordpress/icons@9.46.0'
17
16
  ];
18
17
 
19
18
  const npmDevDependencies = [
@@ -45,8 +44,6 @@ module.exports = {
45
44
  customScripts: customScripts,
46
45
  npmDependencies: npmDependencies,
47
46
  npmDevDependencies: npmDevDependencies,
48
- },
49
- customBlockJSON: {
50
47
  viewScript: "file:./frontend.js",
51
48
  render: "file:./render.php"
52
49
  }
@@ -11,7 +11,6 @@ $cagov_design_system_is_under_5_8 = version_compare( $wp_version, '5.8', '<' ) ?
11
11
 
12
12
  add_filter( "block_categories$cagov_design_system_is_under_5_8", 'cagov_design_system_block_categories', 10, 2 );
13
13
  add_filter( 'script_loader_tag', 'cagov_design_system_{{slugSnakeCase}}_script_loader_tag', 10, 3 );
14
- add_filter( "allowed_block_types$cagov_design_system_is_under_5_8", 'cagov_design_system_allowed_block_types' );
15
14
 
16
15
  if ( ! function_exists( 'cagov_design_system_block_categories' ) ) {
17
16
  /**
@@ -31,65 +30,11 @@ if ( ! function_exists( 'cagov_design_system_block_categories' ) ) {
31
30
  'title' => 'CA Design System',
32
31
  ),
33
32
  ),
34
- array(
35
- array(
36
- 'slug' => 'cagov-data-viz',
37
- 'title' => 'CA Data Visualization',
38
- ),
39
- ),
40
33
  $categories
41
34
  );
42
35
  }
43
36
  }
44
37
 
45
- if ( ! function_exists( 'cagov_design_system_allowed_block_types' ) ) {
46
- /**
47
- * {{title}} Allowed Block Types
48
- *
49
- * Removes all blocks or patterns from Gutenberg and returns {{title}} Blocks.
50
- *
51
- * @link https://developer.wordpress.org/reference/hooks/allowed_block_types_all/
52
- *
53
- * @param bool|array $allowed_blocks Array of block type slugs, or boolean to enable/disable all. Default true (all registered block types supported).
54
- * @return array
55
- */
56
- function cagov_design_system_allowed_block_types( $allowed_blocks ) {
57
-
58
- // if not debugging, return all blocks.
59
- if ( ! CAGOV_DESIGN_SYSTEM_DEBUG ) {
60
- return $allowed_blocks;
61
- }
62
-
63
- remove_theme_support( 'core-block-patterns' );
64
-
65
- // Core Components.
66
- $core = array(
67
- 'core/image',
68
- 'core/paragraph',
69
- 'core/button',
70
- 'core/table',
71
- 'core/heading',
72
- 'core/list',
73
- 'core/custom-html',
74
- 'core/classic',
75
- );
76
-
77
- // Dynamically get a list of the cagov-design-system blocks.
78
- $cagov_blocks = array();
79
- /*
80
- array_map(
81
- function( $b ) {
82
- return 'cagov-design-system/' . basename( $b );
83
- },
84
- glob( '/blocks/*' )
85
- );
86
- */
87
-
88
- // Return the desired components.
89
- return array_merge( $core, $cagov_blocks );
90
- }
91
- }
92
-
93
38
  if ( ! function_exists( 'cagov_design_system_{{slugSnakeCase}}_script_loader_tag' ) ) {
94
39
  /**
95
40
  * Filters the HTML script tag of an enqueued script.