This is an exploration of how we can use the @wordpress/wp-scripts
package when building blocks.
Setup: npm install
Use:
npm start
to start a dev environment that watches JS changes and rebuilds.npm run build
to build JS files intobuild/index.js
.npm run lint:js
to lint JS files insrc/
.npm run lint:css
to lint CSS files insrc/
.
See: