CLI tool for deploying SPA to Amazon S3 and CloudFront
$ npm install --save-dev kaizenplatform/kaizen-frontend-deploy
$ kaizen-frontend-deploy <build-directory> [options]
The CLI looks for AWS credentials and configuration settings in the following order:
- Command line options
- Environment variables
Command line option | Environment variable | Description | Example |
---|---|---|---|
--aws-access-key-id |
AWS_ACCESS_KEY_ID |
AWS access key | AKIAIOSFODNN7EXAMPLE |
--aws-secret-access-key |
AWS_SECRET_ACCESS_KEY |
AWS secret key | wJalrXUtnFEMI/K7MDENG/bPxRfiCYEXAMPLEKEY |
--s3-region |
S3_REGION |
S3 region name | us-west-1 |
--s3-bucket |
S3_BUCKET |
S3 bucket name | account-web |
--cloudfront-distribution-id |
CLOUDFRONT_DISTRIBUTION_ID |
CloudFront distribution ID | EDFDVBD6EXAMPLE |
Command line option | Environment variable | Description | Example |
---|---|---|---|
--s3-prefix |
S3_PREFIX |
Prefix which is added to the s3 directory | popup/ |
--s3-delete-removed |
S3_DELETE_REMOVED |
Whether to remove s3 objects | no value |
--skip-cloudfront |
SKIP_CLOUDFRONT |
Whether to skip cloudfront invalidation | no value |
--invalidate-all |
INVALIDATE_ALL |
Whether to upload all files in cloudfront invalidation | no value |
$ npm install
$ ./scripts/install-bats.sh # Install Bats for testing
$ npm run test
Please follow by SemVer to decide the version number.
$ git checkout master
$ npm version [major | minor | patch] # see https://docs.npmjs.com/cli/version for more details