Skip to content

Modify scaffold block to create index.js#142

Merged
schlessera merged 1 commit intowp-cli:masterfrom
salcode:sf/block-index-js-138
Apr 19, 2018
Merged

Modify scaffold block to create index.js#142
schlessera merged 1 commit intowp-cli:masterfrom
salcode:sf/block-index-js-138

Conversation

@salcode
Copy link
Copy Markdown
Contributor

@salcode salcode commented Apr 17, 2018

Modify scaffold block to create index.js instead of block.js
This is recommended as a best practice by @zgordon
This optimization allows one to import a block in JavaScript with

import './demo/';

rather than

import './demo/block.js';

See #138

Modify scaffold block to create index.js instead of block.js
This is recommended as a best practice by @zgordon
This optimization allows one to import a block in JavaScript with

import './demo/';

rather than

import './demo/block.js';

See #138
@schlessera schlessera added the command:scaffold-block Related to 'scaffold block' command label Apr 19, 2018
@schlessera schlessera merged commit 1d815f3 into wp-cli:master Apr 19, 2018
@schlessera
Copy link
Copy Markdown
Member

Thanks for the pull-request, @salcode !

@salcode
Copy link
Copy Markdown
Contributor Author

salcode commented Apr 19, 2018

Awesome, thank you!

danielbachhuber pushed a commit that referenced this pull request Nov 18, 2022
Modify scaffold block to create index.js
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

command:scaffold-block Related to 'scaffold block' command

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants