amp-toolbox-cli
A Command Line Interface (CLI) for amp-toolbox
Last updated 3 months ago by amp-toolbox .
Apache-2.0 · Repository · Bugs · Original npm · Tarball · package.json
$ cnpm install amp-toolbox-cli 
SYNC missed versions from official npm registry.

AMP-Toolbox CLI

npm version

The AMP Toolbox command line interface consists of a Node.js program called amp-toolbox-cli that can be run from a Windows, macOS, of UNIX-compatible command line environment. This way, AMP Toolbox can easily be integrated into a command line build process.

Supported commands:

Commands

help

Displays the help menu, listing all available commands:

$ ./amp-toolbox-cli help

Pass a command to get more information about this specific command

./amp-toolbox-cli help [command]

Example:

$ ./amp-toolbox help update-cache

version

Prints the current version

Example:

$ ./amp-toolbox version

runtime-version

Prints the current version of the AMP runtime.

Example:

$ ./amp-toolbox runtime-version

### update-cache

Uses the [AMP update-cache API](https://developers.google.com/amp/cache/update-cache) to update documents stored in AMP Caches.

It requires the public and private keys to be generated, as [described on the documentation](https://developers.google.com/amp/cache/update-cache#rsa-keys). Only the private key is required to generate the cache invalidation URLs, but the public key must be made available to the AMP Caches, as described in the [guidelines](https://developers.google.com/amp/cache/update-cache#update-cache-guidelines).

By default, the application will look for the private key on a file called `privateKey.pem`, on the current working directory.

```shell
$ ./amp-toolbox-cli update-cache https://www.example.com/

Optionally, use the --privateKey parameter to specify the path for the private key.

$ ./amp-toolbox-cli update-cache https://www.example.com/ --privateKey /path/to/private-key.pem

Current Tags

  • 1.2.0-alpha.1                                ...           canary (2 months ago)
  • 0.2.6                                ...           latest (3 months ago)

10 Versions

  • 1.2.0-alpha.1                                ...           2 months ago
  • 1.2.0-alpha.0                                ...           2 months ago
  • 0.2.6                                ...           3 months ago
  • 0.2.5                                ...           4 months ago
  • 0.2.4                                ...           5 months ago
  • 0.2.3                                ...           5 months ago
  • 0.2.2                                ...           8 months ago
  • 0.2.1                                ...           8 months ago
  • 0.2.0                                ...           9 months ago
  • 0.1.0                                ...           10 months ago
Maintainers (1)
Downloads
Today 0
This Week 0
This Month 0
Last Day 0
Last Week 0
Last Month 1
Dependencies (3)
Dev Dependencies (0)
None
Dependents (0)
None

Copyright 2014 - 2017 © taobao.org |