Thanks for your interest in contributing! ❤
$ git clone https://github.com/ibm/publish-extension-webpack-plugin
$ cd publish-extension-webpack-plugin
$ npm install
$ npm start
This spits out the compiled plugin inside dist/
using our webpack config.
You can use the example folder to test the plugin during development.
This folder has a simple manifest file and content script, along with a dedicated webpack config for building a dummy extension using the plugin.
First things first, be sure to create a .env
file inside this folder and include your secret keys. Use .env.example as a guide:
GOOGLE_EXTENSION_ID=your-extension-id-goes-here
GOOGLE_CLIENT_ID=your-client-id-goes-here
GOOGLE_CLIENT_SECRET=your-client-secret-goes-here
GOOGLE_REFRESH_TOKEN=your-refresh-token-goes-here
Now you can build the extension (and thus try the plugin) using the following command:
$ npm run example
If you use Visual Studio Code, you can debug the plugin by running our Example
launch configuration from the debugging tab.
Set breakpoints anywhere as needed.
$ npm test
This runs our unit tests with jest
. Let's keep it at 100% coverage. 😊
If you use Visual Studio Code, you can debug the tests by running our Test
launch configuration from the debugging tab.
Set breakpoints anywhere as needed.
$ npm run lint
This runs eslint
using our style configuration.
Once everything looks good, use the following command to release on npm and GitHub.
$ npm version $semver
$semver
must be a valid semver version string (preferrably patch
, minor
, and major
). See the npm-version docs
for more info.