-
Notifications
You must be signed in to change notification settings - Fork 368
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
Add Webpack/Eslinting for Gutenberg blocks #1533
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
A few small things, then LGTM
.eslintrc.js
Outdated
globals: { | ||
wp: true, | ||
window: true, | ||
document: true, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Funky indentation here
/** | ||
* Register all Gutenblocks | ||
*/ | ||
public function register_blocks() { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is likely to fail since the jobs block is gone. Should we just stub this function out?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
removed!
WordPress' Babel preset package will handle Babel config: https://github.com/WordPress/packages/tree/master/packages/babel-preset-default |
Pulled from #1521
This PR adds in all of the webpack building and eslinting required to build a Gutenberg block.
The Build
The build is pretty standard webpack/babel, with some things borrowed from the Gutenberg build.
I've included it in our
grunt
-based existing build system.When we start building the other blocks, there are a few things we may need to consider: