@@ -26,7 +26,7 @@ export interface Config {
2626 * 构建目录。
2727 *
2828 * 脚手架将在 `${dist}/addon` 存放构建后打包前的代码。
29- * 在 `${dist}/${package_json.name }.xpi` 存放打包结果。
29+ * 在 `${dist}/${xpiName }.xpi` 存放打包结果。
3030 *
3131 * @default "build"
3232 */
@@ -50,7 +50,7 @@ export interface Config {
5050 *
5151 * 插件命名空间
5252 *
53- * @default _.kebabCase (name)
53+ * @default _.dash (name)
5454 */
5555 namespace : string ;
5656
@@ -67,26 +67,29 @@ export interface Config {
6767 */
6868 updateURL : string ;
6969
70+ /**
71+ * 构建所需的配置
72+ */
7073 build : BuildConfig ;
74+
75+ /**
76+ * serve 所需的配置
77+ */
7178 server : ServerConfig ;
7279
7380 /**
7481 * TODO: 使用 addonLint 检查 XPI
7582 */
7683 addonLint : object ;
77- /**
78- * .dotenv 文件路径
79- *
80- * @default `.env`
81- * @deprecated
82- */
83- dotEnvPath : string ;
84+
8485 /**
8586 * 发布相关配置
8687 *
8788 */
8889 release : {
89- // releaseIt: Partial<ReleaseItConfig>;
90+ /**
91+ * bumpp 配置
92+ */
9093 bumpp : VersionBumpOptions ;
9194 } ;
9295 /**
@@ -171,18 +174,18 @@ export interface BuildConfig {
171174 * ```json
172175 * {
173176 * manifest_version: 2,
174- * name: "__addonName__ ",
175- * version: "__buildVersion__ ",
177+ * name: "${name} ",
178+ * version: "${version} ",
176179 * applications: {
177180 * zotero: {
178- * id: "__addonID__ ",
179- * update_url: "__updateURL__ ",
181+ * id: "${id} ",
182+ * update_url: "${updateURL} ",
180183 * strict_min_version: "6.999",
181184 * strict_max_version: "7.0.*",
182185 * },
183186 * gecko: {
184- * id: "__addonID__ ",
185- * update_url: "__updateURL__ ",
187+ * id: "${id} ",
188+ * update_url: "${updateURL} ",
186189 * strict_min_version: "102",
187190 * };
188191 * };
@@ -201,7 +204,6 @@ export interface BuildConfig {
201204 /**
202205 * 是否启用
203206 *
204- *
205207 * @default true
206208 */
207209 enable : boolean | "only-production" ;
@@ -220,16 +222,7 @@ export interface BuildConfig {
220222 // tagName: "release" | "updater" | string;
221223 } ;
222224 /**
223- * The function called when build-in build resolved.
224- *
225- * Usually some extra build process.
226- * All configurations will be parameterized to this function.
227- *
228- * 在默认构建步骤执行结束后执行的函数.
229- *
230- * 通常是一些额外的构建流程.
231- * 所有的配置将作为参数传入此函数.
232- *
225+ * The lifecycle hooks.
233226 */
234227 hooks : Partial < BuildHooks > ;
235228}
@@ -275,8 +268,7 @@ export interface ServerConfig {
275268 */
276269 asProxy : boolean ;
277270 /**
278- * The function called after Zotero started, before build-in watcher ready.
279- *
271+ * The lifecycle hook.
280272 */
281273 hooks : Partial < ServeHooks > ;
282274}
0 commit comments