Skip to content

Commit

Permalink
Create Block: Enhancements for the upcoming npm release (#22978)
Browse files Browse the repository at this point in the history
* Create Block: Revert changes to the list of categories in the prompt
Related issue: #22848
It ensures that blocks will continue to work with WordPress 5.4.x.
We should be able to use the new set of categories once WordPress 5.5 is out.

* Create Block: Add inline comments explaining how CSS imports in JS work
  • Loading branch information
gziolo authored Jun 7, 2020
1 parent c409b71 commit acc611f
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 3 deletions.
2 changes: 1 addition & 1 deletion packages/create-block/lib/prompts.js
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ const category = {
type: 'list',
name: 'category',
message: 'The category name to help users browse and discover your block:',
choices: [ 'text', 'embed', 'media', 'design', 'widgets' ],
choices: [ 'common', 'embed', 'formatting', 'layout', 'widgets' ],
};

const author = {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,10 @@
import { __ } from '@wordpress/i18n';

/**
* Internal dependencies
* Lets webpack process CSS, SASS or SCSS files referenced in JavaScript files.
* Those files can contain any CSS code that gets applied to the editor.
*
* @see https://www.npmjs.com/package/@wordpress/scripts#using-css
*/
import './editor.scss';

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,17 @@ import { registerBlockType } from '@wordpress/blocks';
import { __ } from '@wordpress/i18n';

/**
* Internal dependencies
* Lets webpack process CSS, SASS or SCSS files referenced in JavaScript files.
* All files containing `style` keyword are bundled together. The code used
* gets applied both to the front of your site and to the editor.
*
* @see https://www.npmjs.com/package/@wordpress/scripts#using-css
*/
import './style.scss';

/**
* Internal dependencies
*/
import Edit from './edit';
import save from './save';

Expand Down

0 comments on commit acc611f

Please sign in to comment.