Web extension starter kit built with Grommet, React, Styled Components, Babel, Webpack, Jest, Enzyme, ESLint, Prettier, Husky.
Compatible with Google Chrome, Mozilla Firefox, Microsoft Edge and Brave Browser.
Install dependencies and start local development
npm install (or yarn)
npm start
Load extension in Chrome
-
Visit
chrome://extensions
and enable Developer mode -
Choose Load unpacked and point to the
dist
directory in your new project
Load extension in Firefox
- Go to Add-ons from menu
- In Manage Your Extensions, select Debug Add-ons from the settings menu
- Choose Load Temporary Add-on... and point to the manifest file in the
dist
directory of your new project
Load extension in Edge
- Visit
edge://extensions
and enable Developer mode - Choose Load unpacked and point to the
dist
directory in your new project
Load extension in Brave
- Visit
brave://extensions
and enable Developer mode - Choose Load unpacked and point to the
dist
directory in your new project
npm run build
- Builds a production-ready unpacked extension
npm start
- Runs webpack in watch mode
npm test
- Runs test suite
npm run lint
- Runs linter on source files
npm run prettify
- Formats all source files
- Install the Prettier - Code formatter extension from the marketplace
- Open VS Code's user settings/preferences as JSON and put the following:
"editor.defaultFormatter": "esbenp.prettier-vscode",
"editor.formatOnSave": true
If you want to limit the scope to the current project only, create a new file .vscode/settings.json
in the root of your project and paste the settings from above.
Install the ESLint extension from the marketplace to enable seamless linting as you type in VSCode.
Install the EditorConfig extension from the marketplace.