UNPKG

@ziuchen/tencent-scf-utils

Version:
63 lines (43 loc) 991 B
# @ziuchen/tencent-scf-utils A simple tool for deploying Tencent SCF ## Install ```sh npm i @ziuchen/tencent-scf-utils -D ``` ## Usage ```sh tscf -h ``` ## Best Practice tscf will load config from enviroment variables below: ```bash TENCENTCLOUD_SCF_FUNCTION_NAME=xxxxxxxxxxxxxxxxxxxx TENCENTCLOUD_SCF_SECRET_ID=xxxxxxxxxxxxxxxxxxxx TENCENTCLOUD_SCF_SECRET_KEY=xxxxxxxxxxxxxxxxxxxx ``` Using with `@dotenvx/dotenvx`: ```json { "scripts": { "deploy:scf": "dotenvx run -- tscf deploy ./dist" } } ``` dotenvx will load enviroment variables from `.env` file for `tencent-scf-utils`. ## Development This link `tencent-scf-utils` to global. ```sh pnpm link -g ``` In other package, run this to link `tencent-scf-utils` locally. ```sh pnpm link -g tencent-scf-utils ``` After modified code, you should rerun these command to make changes apply. ## Publish ```sh pnpm login --registry=https://registry.npmjs.org/ ``` ```sh pnpm publish --access=public --no-git-checks ```