0.7.0 • Published 2 years ago

@totebox/cli v0.7.0

Weekly downloads
4
License
MIT
Repository
github
Last release
2 years ago

@totebox/cli

安装

npm i @totebox/cli

使用

用于模块

const { indicator } = require('@totebox/cli');

用于命令行

ftp-deploy

API

indicator(waitingText = 'waiting', duration = 120)

返回 stop() 方法,用来停止指示器。这是示例:

console.log('Indicator starting...');
const stopIndicator = indicator();

setTimeout(() => {
  stopIndicator();
  console.log('Indicator stopped!');
}, 5000);

CLI

ftp-deploy

用于部署静态资源到 ftp 服务器,你需要在项目中配置一个文件 .ftpdeployconfig,这里是个完整示例:

username = username
password = password
host = host
port = port
from = dist
to = /data/awesome_project/

注意: 此文件的内容为敏感信息,你应该始终把文件 .ftpdeployconfig 加入到 .gitignore 中。

可选参数

fromto 两个选项,你可以通过在命名后面传递参数来覆盖配置文件的参数,比如:

ftp-deploy --from build --to /data/awesome_project_2/

fromto 也有两个简写别名:

ftp-deploy -f [from] -t [to]

License

MIT © nicolaszhao

0.7.0

2 years ago

0.6.0

4 years ago

0.5.0

4 years ago

0.5.1

4 years ago

0.4.4

4 years ago

0.4.3

4 years ago

0.4.2

4 years ago

0.4.1

4 years ago

0.4.0

4 years ago

0.3.1

4 years ago

0.3.0

4 years ago

0.2.0

4 years ago