@wordpress/create-block 4.95.0 → 4.96.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.
- package/lib/check-system-requirements.js +1 -8
- package/lib/index.js +0 -7
- package/lib/init-block.js +1 -8
- package/lib/init-package-json.js +0 -7
- package/lib/init-wp-env.js +1 -8
- package/lib/init-wp-scripts.js +0 -7
- package/lib/log.js +0 -3
- package/lib/output.js +1 -4
- package/lib/scaffold.js +0 -7
- package/lib/templates/block/edit.js.mustache +0 -2
- package/lib/templates/block/index.js.mustache +0 -5
- package/lib/templates.js +0 -7
- package/package.json +3 -3
|
@@ -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
|
|
package/lib/init-package-json.js
CHANGED
|
@@ -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 ( {
|
package/lib/init-wp-env.js
CHANGED
|
@@ -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 } ) => {
|
package/lib/init-wp-scripts.js
CHANGED
package/lib/log.js
CHANGED
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.
|
|
3
|
+
"version": "4.96.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.
|
|
41
|
+
"@wordpress/lazy-import": "^2.53.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": "
|
|
57
|
+
"gitHead": "989764d42ff93e33684aaf0b96a5b7f3d9bbff52"
|
|
58
58
|
}
|