Skip to content

Latest commit

 

History

History
77 lines (48 loc) · 1.68 KB

File metadata and controls

77 lines (48 loc) · 1.68 KB

Development and Production Versions

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.

Rebuilding from Source

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 install

This 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 build

This command will:

  • Clean the dist/ directory
  • Build both production (minified) and development versions

Development Workflow

For active development, you can use the watch mode to automatically rebuild when source files change:

npm run dev

Testing

Run the test suite with:

npm run test

For watch mode during development:

npm run test:watch

For test coverage:

npm run test:coverage

Formatting and Linting

Format code with Prettier:

npm run format

Check code style with ESLint:

npm run lint

Releasing

  1. Update version in package.json

  2. git commit, git push

  3. git tag , git push --tags