cfw
Last updated a year ago by lukeed .
Original npm · Tarball · package.json
$ cnpm install cfw 
SYNC missed versions from official npm registry.

cfw CI npm

A build and deploy utility for Cloudflare Workers.


WORK IN PROGRESS

Status: Functional, but incomplete.


Credentials

There are two approaches in providing cfw with a set of Cloudflare credentials:

Persisted

Create a ~/.cfw/config file, where ~ is that path to your home directory. Inside, you'll store your credentials under different "profile" namespaces. (If you're familiar, this is very similar to an AWS credentials file.) An example file may look like this:

[personal]
CLOUDFLARE_AUTH_EMAIL = hello@me.com
CLOUDFLARE_ACCOUNTID = ACCOUNTID_VALUE
CLOUDFLARE_AUTH_KEY = GLOBAL_API_KEY

In this case, we have a "personal" profile containing our personal account credentials, for example. You can define multiple credential groups by repeating this template as needed, using different profile names.

[personal]
CLOUDFLARE_AUTH_EMAIL = hello@me.com
# ...

[work]
CLOUDFLARE_AUTH_EMAIL = hello@company.com
# ...

Additionally, all credential key names may be lowercased.

Default Profile

If a profile named "default" exists, then cfw will auto-load that credentials group when no there is no profile configured.

Selecting a Profile

You may use a profile key inside your configuration file, or define --profile when running an cfw command.

Environment Variables

The same keys found within your credentials file may be used again as environment variables.

When defined, an environment variable takes priority over all other configuration avenues.

License

MIT © Luke Edwards

Current Tags

  • 0.0.9                                ...           latest (3 months ago)

9 Versions

  • 0.0.9                                ...           3 months ago
  • 0.0.8                                ...           4 months ago
  • 0.0.7                                ...           7 months ago
  • 0.0.6                                ...           7 months ago
  • 0.0.5                                ...           9 months ago
  • 0.0.4                                ...           10 months ago
  • 0.0.3                                ...           10 months ago
  • 0.0.2                                ...           a year ago
  • 0.0.1                                ...           2 years ago
Maintainers (1)
Downloads
Today 0
This Week 0
This Month 0
Last Day 0
Last Week 0
Last Month 1
Dependencies (6)
Dev Dependencies (1)
Dependents (0)
None

Copyright 2014 - 2016 © taobao.org |