Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixed typo in the wp_register_script function for block tutorial #22755

Merged
merged 1 commit into from May 30, 2020

Conversation

aharish
Copy link
Contributor

@aharish aharish commented May 29, 2020

npm run build will generate an index.js file at builds/index.js, and not a block.js.

Description

npm run build will generate an index.js file at builds/index.js. I have changed the code in wp_register_script() from block.js to a index.js.

How has this been tested?

I tested this while creating a test block while following the tutorial. I had copy pasted the code from this page, but was unable to get the block to show up in the editor. I cross checked everything, looked at the examples repo linked in the documentation where it actually has the correct file mentioned. I made the change above and was able to get the block to show up on the editor.

Testing environment:
Node Version: v12.17.0
Webpack Version: 4.43.0

Screenshots

Types of changes

Checklist:

  • My code is tested.
  • My code follows the WordPress code style.
  • My code follows the accessibility standards.
  • My code has proper inline documentation.
  • I've included developer documentation if appropriate.
  • I've updated all React Native files affected by any refactorings/renamings in this PR.

`npm run build` will generate an `index.js` file at `builds/index.js`, and not a blocks.js.
Copy link
Member

@chrisvanpatten chrisvanpatten left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This seems right to me.

@gziolo gziolo merged commit 78587c9 into WordPress:master May 30, 2020
@gziolo gziolo added the [Type] Developer Documentation Documentation for developers label May 30, 2020
@github-actions github-actions bot added the First-time Contributor Pull request opened by a first-time contributor to Gutenberg repository label May 30, 2020
@github-actions
Copy link

Congratulations on your first merged pull request, @aharish! We'd like to credit you for your contribution in the post announcing the next WordPress release, but we can't find a WordPress.org profile associated with your GitHub account. When you have a moment, visit the following URL and click "link your GitHub account" under "GitHub Username" to link your accounts:

https://profiles.wordpress.org/me/profile/edit/

And if you don't have a WordPress.org account, you can create one on this page:

https://login.wordpress.org/register

Kudos!

@github-actions github-actions bot added this to the Gutenberg 8.3 milestone May 30, 2020
@oandregal oandregal changed the title Fixed typo in the wp_register_script function Fixed typo in the wp_register_script function for block tutorial Jun 8, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
First-time Contributor Pull request opened by a first-time contributor to Gutenberg repository [Type] Developer Documentation Documentation for developers
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants