Git Product home page Git Product logo

publish-extension-webpack-plugin's Introduction

npm travis cover

Publish Extension Webpack Plugin

A webpack plugin that publishes extension builds to the Chrome Web Store.

Getting Started

To begin, you'll need to install publish-extension-webpack-plugin:

$ npm install publish-extension-webpack-plugin --save-dev

Then add the plugin to your webpack config. For example:

webpack.config.babel.js

import PublishExtensionPlugin from 'publish-extension-webpack-plugin';

export default {
  // ...
  plugins: [
    new PublishExtensionPlugin({
      // options go here
    }),
  ],
};

And run webpack via your preferred method.

Options

extensionId

Type: String Default: process.env.GOOGLE_EXTENSION_ID

If not provided via options, this must be present in your environment as GOOGLE_EXTENSION_ID. You can get this from your extension's control panel on the Developer Dashboard.

$ GOOGLE_EXTENSION_ID=extensionidgoeshere123 webpack

clientId

Type: String Default: process.env.GOOGLE_CLIENT_ID

If not provided via options, this must be present in your environment as GOOGLE_CLIENT_ID. You can get this and your other secret keys by following this guide.

$ GOOGLE_CLIENT_ID=clientidgoeshere123 webpack

clientSecret

Type: String Default: process.env.GOOGLE_CLIENT_SECRET

If not provided via options, this must be present in your environment as GOOGLE_CLIENT_SECRET. You can get this and your other secret keys by following this guide.

$ GOOGLE_CLIENT_SECRET=clientsecretgoeshere123 webpack

refreshToken

Type: String Default: process.env.GOOGLE_REFRESH_TOKEN

If not provided via options, this must be present in your environment as GOOGLE_REFRESH_TOKEN. You can get this and your other secret keys by following this guide.

$ GOOGLE_REFRESH_TOKEN=refreshtokengoeshere123 webpack

path

Type: String Default: webpack.output.path

The path containing the build of your extension. This should include a manifest file.

// in your webpack.config.js
new PublishExtensionPlugin({
  path: './dist/my-chrome-extension/',
})

keepBundleOnSuccess

Type: Boolean Default: false

By default, the generated ZIP file used for publishing the extension is deleted if the upload is successful. Set this to true to keep the ZIP file.

// in your webpack.config.js
new PublishExtensionPlugin({
  keepBundleOnSuccess: true,
})

silent

Type: Boolean Default: false

Set this to true to suppress logging.

// in your webpack.config.js
new PublishExtensionPlugin({
  silent: true,
})

disabled

Type: Boolean Default: false

Set this to true to disable the plugin (this is the same as not including it to begin with).

// in your webpack.config.js
new PublishExtensionPlugin({
  disabled: true,
})

Contributing

PRs are welcome! Please see the contributing guide.

publish-extension-webpack-plugin's People

Contributors

bcanseco avatar dependabot[bot] avatar

Stargazers

 avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

publish-extension-webpack-plugin's Issues

Extension name is uglified in logs

SOFTWARE VERSION
publish-extension-webpack-plugin 1.1.0
node 9.8.0
npm 5.6.0
Operating system MacOS 10.13.5
ℹ 「e」: Published new extension version (SUCCESS).

Allow choosing a target audience

The webstore.publish function in chrome-webstore-upload takes a target parameter, which is currently hardcoded to "default". This prevents publishing limited-availability versions to trusted users.

I propose taking a "target" parameter with values "default" (the default) or "trustedUsers" and passing it to webstore.publish.

Add support for other browsers

Maybe this module could export multiple plugins for each browser, the default being the current Chrome implementation?

manifest.json friendly browsers:

Open Source Extension Assimilation

I think it would be a good idea to enhance the open source projects that exist around chrome extensions out there by adding this webpack component!

Most of them are utilizing webpack and mainly chrome extensions. I think it would be good to create a list of strong repo's out there on this thread and target a few.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.