Skip to content

Latest commit

 

History

History
93 lines (60 loc) · 2.43 KB

CONTRIBUTING.md

File metadata and controls

93 lines (60 loc) · 2.43 KB

publish-extension-webpack-plugin

Thanks for your interest in contributing! ❤

Table of Contents

Dependencies

Installing

$ git clone https://github.com/ibm/publish-extension-webpack-plugin
$ cd publish-extension-webpack-plugin
$ npm install

Building

$ npm start

This spits out the compiled plugin inside dist/ using our webpack config.

Developing

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

Debugging with VS Code

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.

Testing

$ npm test

This runs our unit tests with jest. Let's keep it at 100% coverage. 😊

Debugging with VS Code

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.

Linting

$ npm run lint

This runs eslint using our style configuration.

Releasing

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.