61 lines
1.6 KiB
Markdown
61 lines
1.6 KiB
Markdown
```
|
|
vdv@lorelei:~$ npx @wordpress/create-block@latest
|
|
|
|
Let's customize your WordPress plugin with blocks:
|
|
✔ The template variant to use for this block: dynamic
|
|
✔ The block slug used for identification (also the output folder name): wp-printable-qrcode
|
|
✔ The internal namespace for the block name (something unique for your products): wppqr
|
|
✔ The display title for your block: Printable QR code
|
|
✔ The short description for your block (optional): Print a QR code to the web view
|
|
✔ The dashicon to make it easier to identify your block (optional): smiley
|
|
✔ The category name to help users browse and discover your block: widgets
|
|
✔ Do you want to customize the WordPress plugin? No
|
|
|
|
Creating a new WordPress plugin in the /home/vdv/wp-printable-qrcode directory.
|
|
|
|
Creating a "block.json" file.
|
|
|
|
Creating a "package.json" file.
|
|
|
|
Installing `@wordpress/scripts` package. It might take a couple of minutes...
|
|
|
|
Formatting JavaScript files.
|
|
|
|
Compiling block and generating blocks manifest.
|
|
|
|
Done: WordPress plugin Printable QR code bootstrapped in the /home/vdv/wp-printable-qrcode directory.
|
|
|
|
You can run several commands inside:
|
|
|
|
$ npm start
|
|
Starts the build for development.
|
|
|
|
$ npm run build
|
|
Builds the code for production.
|
|
|
|
$ npm run format
|
|
Formats files.
|
|
|
|
$ npm run lint:css
|
|
Lints CSS files.
|
|
|
|
$ npm run lint:js
|
|
Lints JavaScript files.
|
|
|
|
$ npm run plugin-zip
|
|
Creates a zip file for a WordPress plugin.
|
|
|
|
$ npm run packages-update
|
|
Updates WordPress packages to the latest version.
|
|
|
|
To enter the directory type:
|
|
|
|
$ cd wp-printable-qrcode
|
|
|
|
You can start development with:
|
|
|
|
$ npm start
|
|
|
|
Code is Poetry
|
|
```
|