grunt-alibabacloud-cdn

1.0.0 • Public • Published

grunt-alibabacloud-cdn

Cache refresher for Alibaba Cloud (Aliyun) CDN.

Getting Started

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-alibabacloud-cdn --save-dev

Once the plugin has been installed, it may be enabled inside your Gruntfile with this line of JavaScript:

grunt.loadNpmTasks('grunt-alibabacloud-cdn');

Upload task

Run this task with the grunt alibabacloud_cdn command.

Task targets, files and options may be specified according to the grunt Configuring tasks guide.

Options

  • accessKeyId {String} access key you create on aliyun console website
  • appSecret {String} access secret you create
  • refreshPaths {Array} array of urls that you would like to refresh.
  • refreshDirs {Array} array of url prefixs to clear. This will clear all objects under path.

Usage Examples

    "alibabacloud_cdn": {
        "options": {
            "accessKeyId": "YOUR_ALISDK_ID",
            "appSecret": "YOUR_ALISDK_KEY"
        },
        "staging_cdn": {
            "options": {
                "refreshDirs": ["http://example.com/static/"],
                "refreshPaths": ["http://example.com/index.html"]
            }
        }
    }

Dependencies (2)

Dev Dependencies (1)

Package Sidebar

Install

npm i grunt-alibabacloud-cdn

Weekly Downloads

0

Version

1.0.0

License

MIT

Last publish

Collaborators

  • emlyn-resn