maxcdn-purge
v0.0.1
Published
Commandline helper to purge MaxCDN zones.
Downloads
8
Readme
maxcdn-purge
Install
npm install -g maxcdn-purge
CLI
# basic usage
$ maxcdn-purge --alias alias --key <consumer_key> --secret <consumer_secret>
# detail usage
$ maxcdn-purge --help
Usage: purge.js --alias ALIAS --key KEY --secret SECRET [OPTIONS]
Required:
--alias: Your consumer alias.
--key: Your oauth consumer key.
--secret: Your oauth consumer secret token.
Note:
alias, key and secret can also be read from your environment
via exporting ALIAS, KEY, and/or SECRET with your credentials.
Optional:
--pull: One or more pull zones to purge.
--push: One or more push zones to purge.
--file: One or more files to purge.
--help: This help message.
Examples:
$ ./purge.js --alias ALIAS --key KEY --SECRET --zone 12345 --zone 54321
$ ./purge.js --alias ALIAS --key KEY --SECRET --zone [ 12345 54321 ]
$ ./purge.js --alias ALIAS --key KEY --SECRET --zone 12345
$ --file /master.css --file /master.js
In Node.js
var purge = require('maxcdn-purge');
purge({
alias: 'alias',
key: 'consumer_key',
secret: 'consumer_secret',
// pull: [ 12345, 23456 ],
// push: [ 54321, 65432 ],
// file: [ '/foo.css', '/bar.css' ]
}, function (err, res) {
if (err) console.trace(err);
console.dir(res);
});
Development
$ git clone https://github.com/jmervine/maxcdn-purge.git
cd maxcdn-purge
npm install
npm test