2.0.0-alpha-2 • Published 11 months ago

@itkyk/aws-s3-sync v2.0.0-alpha-2

Weekly downloads
-
License
MIT
Repository
-
Last release
11 months ago

@itkyk/aws-s3-sync

install

$ npm i -D @itkyk/aws-s3-sync

Introduce

  1. Add init command to script in package.json.
{
  "script": {
    "init": "sync --init"
  }
}
  1. Execute init command.This command makes s3.config.ts in root.
$ npm run init
  1. Open s3.config.ts, then write AWS/S3 settings.

  2. Add deploy command to script in package.jsonThe location of "preview" will be the name you changed from template earlier.

{
  "script": {
      "deploy": "sync --deploy example"
  }
}
  1. If execute npm run deploy, sync s3 bucket.

setting options

keydescriptiondefault
configureAWS.S3ClientConfig & AWS.CloudFrontClientConfig settings.
localTargetDir name of traget local files.
bucketNameName of Target Bucket.
includesGlob pattern of localTarget./**/*
excludesGlob pattern of excludes pattern.
maxAsyncS330
syncDelete file when syncing.false
forceUpload all files without checking remote files.false
exactTimestampsWhen syncing, also check the TimeStamp.false
outputLogLog file settings.(boolean OR {outDir: string, filename?: string})false
outputLog.outDirOutput log file directory../s3
outputLog.filenameOutput log filename.log-[yy-mm-dd-hh-mm-ss].json
clearCache.distributionIdTarget CloudFront distoributionId.
clearCache.pathsdistoribution paths.string[]