@itkyk/aws-s3-sync
v2.0.0-alpha-2
Published
Downloads
258
Readme
@itkyk/aws-s3-sync
install
$ npm i -D @itkyk/aws-s3-sync
Introduce
- Add init command to script in package.json.
{
"script": {
"init": "sync --init"
}
}
- Execute init command.This command makes
s3.config.ts
inroot
.
$ npm run init
Open
s3.config.ts
, then write AWS/S3 settings.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"
}
}
- If execute
npm run deploy
, sync s3 bucket.
setting options
| key | description | default |
|---------------------------|------------------------------------------------------------------------|-----------------------------|
| configure | AWS.S3ClientConfig
& AWS.CloudFrontClientConfig
settings. | |
| localTarget | Dir name of traget local files. | |
| bucketName | Name of Target Bucket. | |
| includes | Glob pattern of localTarget
. | /**/*
|
| excludes | Glob pattern of excludes pattern. | |
| maxAsyncS3 | | 30 |
| sync | Delete file when syncing. | false |
| force | Upload all files without checking remote files. | false |
| exactTimestamps | When syncing, also check the TimeStamp. | false |
| outputLog | Log file settings.(boolean
OR {outDir: string, filename?: string}
) | false |
| outputLog.outDir | Output log file directory. | ./s3
|
| outputLog.filename | Output log filename. | log-[yy-mm-dd-hh-mm-ss].json
|
| clearCache.distributionId | Target CloudFront distoributionId. | |
| clearCache.paths | distoribution paths.string[]
| |