generate-chrome-extension
v1.1.2
Published
Boilerplate for Custom Chrome Extensions
Downloads
5
Maintainers
Readme
generate-chrome-extension
Boilerplate for Custom Chrome Extensions
Easily create Google Chrome Extensions using the latest
version of React.
The following scenarios/options are supported:
- Popup ✓
- New Tab ✓
- Options ✓
- Background Page ✓
- Content Page ✓
How to install
npm install -g generate-chrome-extension
Start creating a new project
react-chrome
How to use/develop
- change directory to your newly created project
- run react app (extensions files) on the browser
npm run start
- build unpacked extension
npm run build
- production build (this zip file can upload to Google WebStore)
npm run pack
- goto:
chrome://extensions
in the browser and enable'developer mode'
- press
Load unpacked
and target the folderbuild/
The project is automatically being watched, any changes to the files will recompile the project.
NOTE: changes to the content page and background page scripts requires you to reload the extension in chrome://extensions
Build/package for production
- update version number inside
./src/manifest.json
- run
npm run pack
- upload
extension-build.zip
to the chrome webstore.
This will run a production build and will automatically zip it as an extension package in the root folder named: extension-build.zip
React folder
This folder contains the react single app source code. inside it can build page for popup, options, tabs.
see: ./src/
Chrome folder
This ./build
folder contains the content page,background page, popup page scripts.