A Chrome extension boilerplate built with Svelte, TailwindCSS, Jest, and Rollup.
The Svelte Tailwind Extension Boilerplate is a code template that allows developers to start building a Chrome extension using JavaScript or TypeScript. It utilizes Svelte for the frontend, Tailwind CSS for styling, Jest for testing, and Rollup as the build system. With automatic reloading during development and optimized bundle sizes, this boilerplate aims to make the process of developing Chrome extensions easier and more enjoyable.
To get started using the Svelte Tailwind Extension Boilerplate, follow these steps:
degit, type the following command into your terminal:npx degit <repository-url>
For development with automatic reloading, follow these additional steps:
Open the Extensions Dashboard, enable “Developer mode”, and click on “Load unpacked”.
Choose the dist folder to load the extension.
For production build and publishing to Chrome, run the following command:
npm run build
This will create a ZIP file with your package name and version in the releases folder.
If you prefer to use TypeScript, you can set up a TypeScript development environment using the provided script. After cloning the template, run the script with the following command:
bash scripts/setup-typescript.sh
To remove the TypeScript setup script, use the following command:
rm scripts/setup-typescript.sh
The Svelte Tailwind Extension Boilerplate provides developers with a convenient starting point for building Chrome extensions. It offers features such as automatic reloading during development, TypeScript support, Tailwind CSS integration, the Svelte framework, the Jest testing framework, and the Rollup build system. These choices were made to prioritize ease of use, optimal development experience, small bundle sizes, and efficient CSS styling. Special thanks are given to extend-chrome for their rollup-plugin-chrome-extension and to other repos that contributed to the creation of this boilerplate.