在线时间:8:00-16:00
迪恩网络APP
随时随地掌握行业动态
扫描二维码
关注迪恩网络微信公众号
开源软件名称:c301/grunt-webstore-upload开源软件地址:https://github.com/c301/grunt-webstore-upload开源编程语言:JavaScript 100.0%开源软件介绍:grunt-webstore-upload
Getting StartedThis plugin requires Grunt. If you haven't used Grunt before, be sure to check out the Getting Started guide, as it explains how to create a Gruntfile as well as install and use Grunt plugins. Once you're familiar with that process, you may install this plugin with this command: npm install grunt-webstore-upload --save-dev Once the plugin has been installed, it may be enabled inside your Gruntfile with this line of JavaScript: grunt.loadNpmTasks('grunt-webstore-upload'); The "webstore_upload" taskOverviewRead more about great ability to automate this task here: Chrome Web Store Publish API.
In your project's Gruntfile, add a section named Please note, that you have to upload your extension first time manually, and then provide appID to update ( see below ). Also please make sure, that your draft ready to be published, ie all required fields was populatedgrunt.initConfig({
webstore_upload: {
"accounts": {
"default": { //account under this section will be used by default
publish: true, //publish item right after uploading. default false
client_id: "ie204es2mninvnb.apps.googleusercontent.com",
client_secret: "LEJDeBHfS"
},
"other_account": {
publish: true, //publish item right after uploading. default false
client_id: "ie204es2mninvnb.apps.googleusercontent.com",
client_secret: "LEJDeBHfS",
refresh_token: "1/eeeeeeeeeeeeeeeeeeeeeee_aaaaaaaaaaaaaaaaaaa"
},
"new_account": {
cli_auth: true, // Use server-less cli prompt go get access token. Default false
publish: true, //publish item right after uploading. default false
client_id: "kie204es2mninvnb.apps.googleusercontent.com",
client_secret: "EbDeHfShcj"
}
},
"extensions": {
"extension1": {
//required
appID: "jcbeonnlikcefedeaijjln",
//required, we can use dir name and upload most recent zip file
zip: "test/files/test1.zip"
},
"extension2": {
account: "new_account",
//will rewrite values from 'account' section
publish: false,
appID: "jcbeonnlplijjln",
zip: "test/files/test2.zip"
}
}
}
}) CLI optionsYou can pass multiple compile targets separated with comas: -mMessage for release, can be used within -aupload only extensions for provided account --groupupload only extensions for provided group --exclude-groupexclude extensions of this group --exclude-single <extension_name>exclude extension ConfigurationaccountsList of the accounts (see Accounts section for details). Type: Required extensionsList of the extension (see Extensions section for details). Type: Required onCompleteFunction that will be executed when all extension uploaded. Array of released extensions and release message ( see
Type: Optional fakeUploadSimulate success upload Type: Option fakeGoodPublishSimulate success publish Type: Option fakeBadPublishSimulate failed publish Type: Option AccountsSince Google allows only 20 extensions under one account, you can create multiple records here.
It is object with arbitrary meaningful accounts names as a keys (see example above).
Special account named publishMake item available at Chrome Webstore or not Type: Default value: Optional client_idHow to get it Client ID to access to Chrome Console API Type: Required client_secretHow to get it Client Secret to access to Chrome Console API Type: Required refresh_tokenHow to get it Refresh token for the Chrome Console API Type: Optional skipUnpublishedSkip extensions where Type: Default value: Optional safe_global_uploadAllow global upload only with Type: Default value: Optional retryOneMoreTimeWill be called on each uploading/publishing error. Should return true in case of one more try ( return false by default ). Type: Example
Optional ExtensionsIt is object with arbitrary meaningful extensions names as a keys (see example above). appIDExtension id or Application id at Chrome Webstore Type: Required zipPath to zip file. Upload most recent zip file in case of path is directory Type: Required publishMake item available at Chrome Webstore or not.
This option under Type: Default value: Optional publishTargetMake item available at .
See https://developer.chrome.com/webstore/webstore_api/items/publish
Can be Type: Default value: Optional accountName of the account, that we should use to upload extension. If ommited, Type: Default value: Optional groupName of the group, that we should use to upload extension. Type: Optional skipskip this extension ( don't upload, etc ) Type: Default value: Optional Migrating from < 0.7 versionsIn order to move your existing config to new version, do following steps:
WorkflowRead more about Chrome Web Store Publish API and how to get Client ID and Client secret
To automatically pull a new access token using a refresh token just set the ContributingIn lieu of a formal styleguide, take care to maintain the existing coding style. Add unit tests for any new or changed functionality. Lint and test your code using Grunt. Release History0.8.9 0.7.0 Allowed multiple accounts. Async multiple uploading. Redo configuration style. 0.5.1 Fix problem with path 0.5.0 Initial commit LicenseCopyright (c) 2014 Anton Sivolapov. Licensed under the MIT license. |
2023-10-27
2022-08-15
2022-08-17
2022-09-23
2022-08-13
请发表评论