@jdplc/s3-vue-deploy
v1.0.5
Published
upload vue assets to s3
Downloads
1
Readme
S3 Asset Uploader
Enables you to quickly upload build assets to an S3 location.
Configuration Options
source
default:dist
- location where your files will be uploaded froms3:location
default:page/package-name
- target location within the s3 bucket
Here is an example object in package.json
"deployment": {
"source": "dist",
"s3:location": "page/s3-vue-deploy"
}
Releasing UAT and Live versions of Projects
If yould like to release a built files for a project onto the S3, but inside of seperate UAT folders (i.e. s3/live/project-files or s3/uat/project-files) then include a environmentFolders variable in the deployment object your package.json file:
"deployment": {
"s3:location": "page/s3-vue-deploy",
"environmentFolders": true
}
With this varaible present in the package.json, s3-vue-deploy will look at an Environment Variable called: S3_ENV_FOLDER to get the name of the folder to store the built project files in.
You could set this environment variable when the scripts to publish the project are ran, i.e.:
"publish:uat": "cross-env S3_ENV_FOLDER=uat release uat",
"publish:live": "cross-env S3_ENV_FOLDER=live release live"
[Note]: The cross-env package will need to be installed in your project for the above scripts to work.
Commands
Add S3 keys to your system, pass true to overwrite settings
$ release enviroment [true|false]
Print the code to be added to your page - outputs to console.
$ release code
Release development code to UAT
$ release uat
Release code to production
$ release live