使用
创建配置文件
在你的项目根目录下创建配置文件,支持三种类型(js---commomJs模式
, ts
, json
)
deploy.config.json
{
"relativePath": "./docs/.vuepress/dist",
"branchName": "main",
"files": ".",
"message": "#",
"remoteUrl": "https://github.com/*/*.git"
}
deploy.config.ts
import {defineConfig} from "@ddongui/deploy"
export default defineConfig({
relativePath: "./docs/.vuepress/dist",
branchName: "main",
files: ".",
message: "#",
remoteUrl: "https://github.com/*/*.git"
})
deploy.config.js
module.exports = {
relativePath: "./docs/.vuepress/dist",
branchName: "main",
files: ".",
message: "#",
remoteUrl: "https://github.com/*/*.git"
}
module js的支持将会在未来加入
使用
通过脚本
在你的项目根目录下的 packages.json
中加入
{
"scripts": {
"deploy": "deploy"
}
}
npm run deploy
通过全局命令
前提:需要全局安装deploy
和局部安装的唯一区别是不需要在packages.json
中加入 script
属性, 直接可以在项目根目录下输入命令 deploy
deploy