- Check if your Node.js version is >= 14.
- Run
npm install
to install the dependencies. - Run
npm start
- Load your extension on Chrome following:
- Access
chrome://extensions/
- Check
Developer mode
- Click on
Load unpacked extension
- Select the
build
folder.
- Access
- Stop development script (if it is running)
- Remove installed dev. extension at
chrome://extensions/
- Run
npm run build
- Load your extension on Chrome following:
- Access
chrome://extensions/
- Check
Developer mode
- Click on
Load unpacked extension
- Select the
build
folder
- Access
We are using release-it
-
Generate
personal access token
in github following the steps:- Go to Github->Settings->DeveloperSettings->PersonalAccessTokens
- For title, enter note as
release-it
- For scopes, select only
repo
- Click
Generate token
-
Create
.env
file inside git repo and copy paste the generatedpersonal access token
inGITHUB_TOKEN
variableGITHUB_TOKEN="f941e0..."
-
Optional. Generate
SSH key
. Following are the steps:- Open
Git Bash
andRun as administrator
- Write the command
ssh-keygen
and generate the key without password. - Go to
.ssh
folder in your computer and copy the contents ofid_rsa.pub
file. - Go to
SSH and GPG keys
in github - link - Press
New SSH key
and paste the contents ofid_rsa.pub
file. - Press
Add SSH key
- Open
-
Optional. Ensure the git origin is using
ssh
and nothttps
. Following are the steps- Verify current git remote URL source:
git remote -v
- If using https, obtain github ssh url from github repository.
- Below steps to replace the origin URL:
git remote remove origin git remote set-url origin <new git url>
- Verify current git remote URL source:
-
Generate release. Steps are:
- In the project directory write the command
npm run release
- It will ask details including below:
? Select increment (next version): [path, minor or major] ? Commit (Release x.y.z)? [Yes/No] ? Tag (vx.y.z)? [Yes/No] ? Push? [Yes/No] ? Create a release on GitHub (Release x.y.z)? [Yes/No]
- As part of the release process, a zip file named
dist.zip
is additionally uploaded.
- In the project directory write the command
We are using modified chrome-extension-boilerplate-react.
To avoid conflict in values across manifest.json and package.json:
- Description is always used from manifest.json
- Version number is used as per package.json [so that extension and release version are in sync]