kaizenplatform / kaizen-frontend-deploy

CLI tool for deploying SPA to Amazon S3 and CloudFront

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

kaizen-frontend-deploy

CLI tool for deploying SPA to Amazon S3 and CloudFront

Installation

$ npm install --save-dev kaizenplatform/kaizen-frontend-deploy

Usage

$ kaizen-frontend-deploy <build-directory> [options]

AWS Credentials and Configurations

The CLI looks for AWS credentials and configuration settings in the following order:

  1. Command line options
  2. Environment variables

Required

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

Optional

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

Development

Installation

$ npm install
$ ./scripts/install-bats.sh  # Install Bats for testing

Testing

$ npm run test

Releasing a new version

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

About

CLI tool for deploying SPA to Amazon S3 and CloudFront


Languages

Language:JavaScript 85.2%Language:Shell 14.8%