@wordpress/create-block 4.95.0 → 4.97.0

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.
@@ -1,14 +1,7 @@
1
- /**
2
- * External dependencies
3
- */
1
+ const { promisify } = require( 'util' );
4
2
  const { confirm } = require( '@inquirer/prompts' );
5
3
  const checkSync = require( 'check-node-version' );
6
4
  const tools = require( 'check-node-version/tools' );
7
- const { promisify } = require( 'util' );
8
-
9
- /**
10
- * Internal dependencies
11
- */
12
5
  const log = require( './log' );
13
6
 
14
7
  const check = promisify( checkSync );
package/lib/index.js CHANGED
@@ -1,13 +1,6 @@
1
- /**
2
- * External dependencies
3
- */
4
1
  const { confirm, select } = require( '@inquirer/prompts' );
5
2
  const { capitalCase } = require( 'change-case' );
6
3
  const program = require( 'commander' );
7
-
8
- /**
9
- * Internal dependencies
10
- */
11
4
  const checkSystemRequirements = require( './check-system-requirements' );
12
5
  const CLIError = require( './cli-error' );
13
6
  const log = require( './log' );
package/lib/init-block.js CHANGED
@@ -1,13 +1,6 @@
1
- /**
2
- * External dependencies
3
- */
4
1
  const { join } = require( 'path' );
5
- const makeDir = require( 'make-dir' );
6
2
  const { writeFile } = require( 'fs' ).promises;
7
-
8
- /**
9
- * Internal dependencies
10
- */
3
+ const makeDir = require( 'make-dir' );
11
4
  const { info } = require( './log' );
12
5
  const { writeOutputTemplate } = require( './output' );
13
6
 
@@ -1,13 +1,6 @@
1
- /**
2
- * External dependencies
3
- */
4
1
  const { command } = require( 'execa' );
5
2
  const npmPackageArg = require( 'npm-package-arg' );
6
3
  const writePkg = require( 'write-pkg' );
7
-
8
- /**
9
- * Internal dependencies
10
- */
11
4
  const { info, error } = require( './log' );
12
5
 
13
6
  module.exports = async ( {
@@ -1,13 +1,6 @@
1
- /**
2
- * External dependencies
3
- */
4
- const { command } = require( 'execa' );
5
1
  const { join } = require( 'path' );
6
2
  const { writeFile } = require( 'fs' ).promises;
7
-
8
- /**
9
- * Internal dependencies
10
- */
3
+ const { command } = require( 'execa' );
11
4
  const { info } = require( './log' );
12
5
 
13
6
  module.exports = async ( { rootDirectory } ) => {
@@ -1,11 +1,4 @@
1
- /**
2
- * External dependencies
3
- */
4
1
  const { command } = require( 'execa' );
5
-
6
- /**
7
- * Internal dependencies
8
- */
9
2
  const { info } = require( './log' );
10
3
 
11
4
  module.exports = async ( { rootDirectory } ) => {
package/lib/log.js CHANGED
@@ -1,7 +1,4 @@
1
1
  /* eslint-disable no-console */
2
- /**
3
- * External dependencies
4
- */
5
2
  const chalk = require( 'chalk' );
6
3
 
7
4
  const code = ( input ) => {
package/lib/output.js CHANGED
@@ -1,10 +1,7 @@
1
- /**
2
- * External dependencies
3
- */
4
1
  const { dirname, join } = require( 'path' );
2
+ const { writeFile } = require( 'fs' ).promises;
5
3
  const makeDir = require( 'make-dir' );
6
4
  const { render } = require( 'mustache' );
7
- const { writeFile } = require( 'fs' ).promises;
8
5
 
9
6
  const writeOutputAsset = async ( inputFile, outputFile, view ) => {
10
7
  const outputFilePath = join( view.rootDirectory, 'assets', outputFile );
package/lib/scaffold.js CHANGED
@@ -1,12 +1,5 @@
1
- /**
2
- * External dependencies
3
- */
4
1
  const { join } = require( 'path' );
5
2
  const { pascalCase, snakeCase } = require( 'change-case' );
6
-
7
- /**
8
- * Internal dependencies
9
- */
10
3
  const initBlock = require( './init-block' );
11
4
  const initPackageJSON = require( './init-package-json' );
12
5
  const initWPScripts = require( './init-wp-scripts' );
@@ -4,7 +4,6 @@
4
4
  * @see https://developer.wordpress.org/block-editor/reference-guides/packages/packages-i18n/
5
5
  */
6
6
  import { __ } from '@wordpress/i18n';
7
-
8
7
  /**
9
8
  * React hook that is used to mark the block wrapper element.
10
9
  * It provides all the necessary props like the class name.
@@ -12,7 +11,6 @@ import { __ } from '@wordpress/i18n';
12
11
  * @see https://developer.wordpress.org/block-editor/reference-guides/packages/packages-block-editor/#useblockprops
13
12
  */
14
13
  import { useBlockProps } from '@wordpress/block-editor';
15
-
16
14
  /**
17
15
  * Lets webpack process CSS, SASS or SCSS files referenced in JavaScript files.
18
16
  * Those files can contain any CSS code that gets applied to the editor.
@@ -4,7 +4,6 @@
4
4
  * @see https://developer.wordpress.org/block-editor/reference-guides/block-api/block-registration/
5
5
  */
6
6
  import { registerBlockType } from '@wordpress/blocks';
7
-
8
7
  /**
9
8
  * Lets webpack process CSS, SASS or SCSS files referenced in JavaScript files.
10
9
  * All files containing `style` keyword are bundled together. The code used
@@ -13,10 +12,6 @@ import { registerBlockType } from '@wordpress/blocks';
13
12
  * @see https://www.npmjs.com/package/@wordpress/scripts#using-css
14
13
  */
15
14
  import './style.scss';
16
-
17
- /**
18
- * Internal dependencies
19
- */
20
15
  import Edit from './edit';
21
16
  {{#isStaticVariant}}
22
17
  import save from './save';
package/lib/templates.js CHANGED
@@ -1,6 +1,3 @@
1
- /**
2
- * External dependencies
3
- */
4
1
  const { existsSync } = require( 'fs' );
5
2
  const { mkdtemp, readFile } = require( 'fs' ).promises;
6
3
  const { tmpdir } = require( 'os' );
@@ -10,10 +7,6 @@ const { command } = require( 'execa' );
10
7
  const glob = require( 'fast-glob' );
11
8
  const npmPackageArg = require( 'npm-package-arg' );
12
9
  const rimraf = require( 'rimraf' ).sync;
13
-
14
- /**
15
- * Internal dependencies
16
- */
17
10
  const CLIError = require( './cli-error' );
18
11
  const { info } = require( './log' );
19
12
  const prompts = require( './prompts' );
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@wordpress/create-block",
3
- "version": "4.95.0",
3
+ "version": "4.97.0",
4
4
  "description": "Generates PHP, JS and CSS code for registering a block for a WordPress plugin.",
5
5
  "author": "The WordPress Contributors",
6
6
  "license": "GPL-2.0-or-later",
@@ -38,7 +38,7 @@
38
38
  },
39
39
  "dependencies": {
40
40
  "@inquirer/prompts": "^7.2.0",
41
- "@wordpress/lazy-import": "^2.52.0",
41
+ "@wordpress/lazy-import": "^2.54.0",
42
42
  "chalk": "^4.1.1",
43
43
  "change-case": "^4.1.2",
44
44
  "check-node-version": "^4.1.0",
@@ -54,5 +54,5 @@
54
54
  "publishConfig": {
55
55
  "access": "public"
56
56
  },
57
- "gitHead": "7e8b17a983f9391d3ebc7717af2a1c9ed7efc7ab"
57
+ "gitHead": "5ef24f60261976bb198ad035db24bf81c1fb92b4"
58
58
  }