Skip to content

0jinxing/static-automator

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

🤿 一个 COS 自动上传工具(代码自动生成)

解决的痛点

😤 繁琐的图片上传

😭 容易出错的 url 硬编码

😂 无可奈何的 cdn 缓存

安装

npm install -g static-automator # or `sudo npm install -g static-automator `

使用

static-automator -h

# Usage: static-automator [options]

# Options:
#   --secretId <string>   Secret Id
#   --secretKey <string>  Secret Key
#   -i, --init            初始化配置文件
#   -s, --sync            上传图片到存储桶
#   -g, --gen             生成相关代码
#   -h, --help            display help for command

配置

# https://console.cloud.tencent.com/cam/capi
# https://ram.console.aliyun.com/manage/ak

"type": "tencent" # or "type": "ali"
"secret_id": "secret_id",
"secret_key": "secret_key",

# 对象存储/桶详情/概览: 可以找到相应的配置
"bucket": "bucket_name",
"region": "bucket_region",

"base": "存储桶目录",

"input": "上传的图片目录",
"output": "代码生成目录",

# scss: 生成 scss vars 文件
# js: 生成 js helper 文件
"generate": { "scss": true, "js": true }

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published