Changes should go into the source files in src/. Then you run the build process outlined below to generate the production-ready files which go into dist/. These files are bundled and minified for optimal performance.
The plugin's build process is managed by Vite, a modern build tool built on top of Node.js. You'll need to have Node.js installed on your machine to rebuild the plugin from source.
Assuming you have Node.js (version 18 or higher) installed, you can install all the build dependencies with a single command, from the plugin's root directory:
npm installThis will install all of the plugin's dependencies into the node_modules directory (which is also why you'll find this directory in the plugin's .gitignore file).
Once you have all the dependencies in place, you can rebuild the plugin from source by running npm run build:
npm run buildThis command will:
- Clean the
dist/directory - Build both production (minified) and development versions
For active development, you can use the watch mode to automatically rebuild when source files change:
npm run devRun the test suite with:
npm run testFor watch mode during development:
npm run test:watchFor test coverage:
npm run test:coverageFormat code with Prettier:
npm run formatCheck code style with ESLint:
npm run lint-
Update version in
package.json -
git commit, git push
-
git tag , git push --tags