0.3.1 • Published 6 months ago
@epiijs/deploy v0.3.1
@epiijs/deploy
A toolkit for deploying any packages anywhere.
npm private plan or running your own npm registry is complex and expensive. 
@epiijs/deploy will allow you to publish or install packages to or from any storages.
Of course you can use Alibaba Cloud or AWS S3 (WIP) as your own storage provider.
Install
npm intall --save-dev @epiijs/deploy 
# OR
npm install --global @epiijs/deployUsage
Prepare
You need a directory with a package.json at least.
{
  "name": "any-package-name",
  "version": "any-package-version",
  "remote": "your-remote-storage",
  "secret": "your-remote-secret-file-name-/-package.secret.json-by-default",
  "ignore": "your-remote-ignore-file-name-/-package.ignore.json-by-default"
}Install / Publish by CLI
epii-deploy install
epii-deploy install [your-package-path]
epii-deploy publish
epii-deploy publish [your-package-path]Remote URI
simple-file
file://your-path-to-package-dir
alibabacloud-oss
oss://endpoint/bucket/object-path-prefix
aws-s3
s3://endpoint/bucket/object-path-prefixSecret
You should keep your credential in KMS services or temp memory like ENV instead of Git repository.
To use ENV keep secret, you can create a secret file package.secret.json.
{
  "accessKeyId": "$YOUR_ACCESS_KEY_ID_ENV_NAME",
  "accessKeySecret": "$YOUR_ACCESS_KEY_SECRET_ENV_NAME"
}And then set ENV while using CLI.
YOUR_ACCESS_KEY_ID_ENV_NAME=X YOUR_ACCESS_KEY_SECRET_ENV_NAME=Y epii-deploy what-you-want-to-doIgnore Files
You can list all ignored files (as glob format) in package.ignore.json.
[
  "some-file-to-ignore"
]