Code Monkey home page Code Monkey logo

gulp-chrome-web-store's Introduction

gulp-chrome-web-store

npm version CircleCI Known Vulnerabilities

Upload and publish items to the Chrome Web Store with Gulp

Installation

npm i -D gulp-chrome-web-store

Configuration

Refer to this page to get the response of credentials and access token.

Set that value in an environment variable.

  • CHROME_WEB_STORE_API_CREDENTIAL
  • CHROME_WEB_STORE_API_ACCESS_TOKEN_RESPONSE

For example:

export CHROME_WEB_STORE_API_CREDENTIAL=$( cat <<EOF | tr -d ' \r\n'
{
  "installed": {
    "client_id": "999999999999-xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx.apps.googleusercontent.com",
    "project_id": "foo-bar-baz",
    "auth_uri": "https://accounts.google.com/o/oauth2/auth",
    "token_uri": "https://oauth2.googleapis.com/token",
    "auth_provider_x509_cert_url": "https://www.googleapis.com/oauth2/v1/certs",
    "client_secret": "abcdefghijklmnopqrstuvwx",
    "redirect_uris": [
      "urn:ietf:wg:oauth:2.0:oob",
      "http://localhost"
    ]
  }
}
EOF
)

export CHROME_WEB_STORE_API_ACCESS_TOKEN_RESPONSE=$(cat <<EOF | tr -d ' \r\n'
{
  "access_token": "vpvEyHWpX^{CQC`fREmnwCHb`ejN`ox^XxEbYDKXmghM`]lrL{ddTrxdgtgLEvAeX\oP]NkRgjFcvNE_enJZI`BNcvZScQOA\BAA|NSzB_Xg_ie_yXLrQ[sII_]r|jW{nzZULNP",
  "expires_in": 3599,
  "refresh_token": "riM{R[Lir|hyHT|DNeWZhQzVpOjvTbTMayHZdfNFlR{TB]KFSh^DyjNZySyj|aWYajb]dNCIRTZXmKKuB`bbUyoLRGkPWao|pibdNSk",
  "scope": "https://www.googleapis.com/auth/chromewebstore",
  "token_type": "Bearer"
}
EOF
)

Usage

For example:

const gulp = require('gulp')
const chromeWebStore = require('gulp-chrome-web-store')(
    process.env.CHROME_WEB_STORE_API_CREDENTIAL,
    process.evn.CHROME_WEB_STORE_API_ACCESS_TOKEN_RESPONSE,
);
const itemId = 'ID of your Chrome extension';
const item = chromeWebStore.item(itemId);

exports.deploy = () => {
    return gulp.src('your-chrome-extension.zip')
        .pipe(item.upload());
}

exports.publish = () => {
    return item.publish();
}

gulp-chrome-web-store's People

Contributors

naokikimura avatar

Stargazers

 avatar  avatar

Watchers

 avatar  avatar

Forkers

noxasch

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.