How to use the chrome-webstore-upload function in chrome-webstore-upload

To help you get started, we’ve selected a few chrome-webstore-upload examples, based on popular ways it is used in public projects.

github WorldBrain / Memex / gulpfile.babel.js View on Github external
gulp.task('publish-extension:chrome', ['package'], () => {
    const extensionID = process.env.WEBSTORE_EXTENSION_ID
    const webStore = ChromeStore({
        extensionId: extensionID,
        clientId: process.env.WEBSTORE_CLIENT_ID,
        clientSecret: process.env.WEBSTORE_CLIENT_SECRET,
        refreshToken: process.env.WEBSTORE_REFRESH_TOKEN,
    })
    const tokenP = webStore.fetchToken()
    const uploadP = tokenP.then(token =>
        webStore.uploadExisting(
            fs.createReadStream('dist/extension.zip'),
            token,
        ),
    )

    return Promise.all([tokenP, uploadP]).then(([token]) =>
        webStore.publish('default', token),
    )

chrome-webstore-upload

Upload Chrome Extensions to the Chrome Web Store

MIT
Latest version published 11 months ago

Package Health Score

75 / 100
Full package analysis

Popular chrome-webstore-upload functions

Similar packages