Skip to content

wp-blocks/typescript-wp-block

Repository files navigation

Typescript WP-Block boilerplate

A clean boilerplate for WordPress Blocks (Gutenberg Editor)

Features:

  • 🪄️ Typed - Write you next WordPress block with next gen strongly typed javascript
  • 🛡️️ Testable - With unit and e2e tests already in place (with coverage checking)
  • 🪶 Lightweight - Only what to you need to start your project, nothing else!
  • 🎈 No dependencies - Dependencies tend to have dependencies endlessly and this can lead to security issues. This is a package, and it doesn't need anything else!
  • 🚀 Ready-to-go - download, replace the string "boilerplate", install, and you are done!
  • 😎 CI - Continuous integration with multiple node builds and testing
  • 📦 Bundled - Webpack optimized and minified build with types!
  • 🪅 Easy to use - No extra skills required! You will build your own plugin according to your knowledge

Setup:

clone the project into your plugin folder:

git clone https://github.com/your-username/typescript-wp-block.git

Then:

  • Rename the plugin folder with the chosen plugin name slug
  • Do the same for the typescript-wp-block.php file with the same string as the directory
  • Replace every occurrence of word "boilerplate" with your own plugin name.
  • Once the above points are completed, install with npm
npm install

and you are 🎉 Done!


Getting started with WordPress Block Editor

https://developer.wordpress.org/block-editor/getting-started/


LINKS