Skip to content

Commit

Permalink
Docs: Improve README file for @wordpress/create-block
Browse files Browse the repository at this point in the history
Based on the suggestions from @zzap in #27602.
  • Loading branch information
gziolo committed Jan 7, 2021
1 parent cf31360 commit ddd14fe
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions packages/create-block/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ $ npm start

_(requires `node` version `12.0.0` or above, and `npm` version `6.9.0` or above)_

You don’t need to install or configure tools like [webpack](https://webpack.js.org), [Babel](https://babeljs.io) or [ESLint](https://eslint.org) yourself. They are preconfigured and hidden so that you can focus on the code.
It creates a WordPress plugin that you need to [install manually](https://wordpress.org/support/article/managing-plugins/#manual-plugin-installation).

## Usage

Expand Down Expand Up @@ -50,8 +50,6 @@ Options:
-h, --help output usage information
```

_Please note that `--version` and `--help` options don't work with `npm init`. You have to use `npx` instead, as presented in the examples._

More examples:

1. Interactive mode - without giving a project name, the script will run in interactive mode giving a chance to customize the important options before generating the files.
Expand All @@ -74,7 +72,7 @@ $ npx @wordpress/create-block --help

When you scaffold a block, you must provide at least a `slug` name, the `namespace` which usually corresponds to either the `theme` or `plugin` name, and the `category`. In most cases, we recommended pairing blocks with plugins rather than themes, because only using plugin ensures that all blocks still work when your theme changes.

## Available Commands [ESNext template]
## Available Commands

When bootstrapped with the `esnext` template (or any external template with `wpScripts` flag enabled), you can run several commands inside the directory:

Expand Down Expand Up @@ -114,6 +112,8 @@ $ npm run packages-update

Updates WordPress packages to the latest version. [Learn more](/packages/scripts#packages-update).

_Note: You don’t need to install or configure tools like [webpack](https://webpack.js.org), [Babel](https://babeljs.io) or [ESLint](https://eslint.org) yourself. They are preconfigured and hidden so that you can focus on coding._

## External Templates

Since version `0.19.0` it is possible to use external templates hosted on npm. These packages need to contain `.mustache` files that will be used during the block scaffolding process.
Expand Down

0 comments on commit ddd14fe

Please sign in to comment.