2.0.1 • Published 3 years ago

static-automator v2.0.1

Weekly downloads
-
License
MIT
Repository
github
Last release
3 years ago

🤿 一个 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 }
2.0.1

3 years ago

2.0.0

3 years ago

1.0.5

3 years ago

1.0.4

3 years ago

1.0.3

3 years ago

1.0.2

3 years ago