@ruan-cat/vercel-deploy-tool 0.1.1 → 0.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +1 -1
- package/src/config.ts +9 -0
- package/src/index.ts +8 -2
package/package.json
CHANGED
package/src/config.ts
CHANGED
|
@@ -92,6 +92,15 @@ export interface Config {
|
|
|
92
92
|
/** 用户项目id */
|
|
93
93
|
vercelProjectId: string;
|
|
94
94
|
|
|
95
|
+
/**
|
|
96
|
+
* 用户提供的 vercel.json 配置文件
|
|
97
|
+
* @description
|
|
98
|
+
* 有时候 用户需要提供自己的一套配置文件
|
|
99
|
+
*
|
|
100
|
+
* 这里提供配置路径
|
|
101
|
+
*/
|
|
102
|
+
vercelJsonPath?: string;
|
|
103
|
+
|
|
95
104
|
/** 在build命令阶段后 执行的用户命令 */
|
|
96
105
|
afterBuildTasks?: string[];
|
|
97
106
|
|
package/src/index.ts
CHANGED
|
@@ -133,9 +133,15 @@ function getVercelTokenCommandArgument() {
|
|
|
133
133
|
return <const>[`--token=${config.vercelToken}`];
|
|
134
134
|
}
|
|
135
135
|
|
|
136
|
-
/**
|
|
136
|
+
/**
|
|
137
|
+
* 以命令参数数组的形式,获得项目vercel的本地配置
|
|
138
|
+
* @description
|
|
139
|
+
* 如果用户自己提供了vercel的本地配置 那么就使用用户的。
|
|
140
|
+
*
|
|
141
|
+
* 否则就使用自己生成的文件。
|
|
142
|
+
*/
|
|
137
143
|
function getVercelLocalConfigCommandArgument() {
|
|
138
|
-
return <const>[`--local-config=${vercelNullConfigPath}`];
|
|
144
|
+
return <const>[`--local-config=${config?.vercelJsonPath ?? vercelNullConfigPath}`];
|
|
139
145
|
}
|
|
140
146
|
|
|
141
147
|
/** 以命令参数数组的形式,获得工作目录 */
|