logo
0
0
WeChat Login
Forkfromcnb/plugins/tencentcom/tencentyun-wecos, behindmain1 commits

tencentyun-wecos

Tencent Cloud wecos WeChat Mini Program COS Size Reduction Solution

Through WeCOS, upload mini program image resources to Tencent Cloud COS, automatically reference online addresses, remove image resources, and solve package size limitation issues.

Usage with Docker

docker run --rm -v $(pwd):$(pwd) -w $(pwd) tencentcom/tencentyun-wecos

Usage with Cloud Native Build

main: push: - stages: - name: tencentyun-wecos image: tencentcom/tencentyun-wecos

Configuration File

Create a wecos.config.json file at the same level as your mini program directory

Example of wecos.config.json configuration:

{ "appDir": "./app", "cos": { "secret_id": "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx" "secret_key": "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx", "bucket": "wxapp-1251902136", "region": "ap-guangzhou", //Region abbreviation selected when creating bucket "folder": "/", //Directory in the bucket where resources are stored } }

appDir

Mini program project directory, default is ./app.

cos

Required, fill in the configuration information for uploading to COS, some information can be viewed in the COS console

More Usage

See: Tencent Cloud wecos

About

tencentyun-wecos

Language
Markdown77.2%
License13.4%
Dockerfile6%
Others3.4%