coda-builder 1.0.8 → 1.2.2
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/README.md +441 -234
- package/build/index.d.mts +12 -18
- package/build/index.d.ts +12 -18
- package/build/index.js +855 -1
- package/build/index.mjs +825 -1
- package/package.json +5 -2
package/build/index.d.mts
CHANGED
|
@@ -5,20 +5,16 @@ import TerserPlugin from 'terser-webpack-plugin';
|
|
|
5
5
|
import CompressionPlugin from 'compression-webpack-plugin';
|
|
6
6
|
|
|
7
7
|
/**
|
|
8
|
-
*
|
|
9
|
-
* -
|
|
10
|
-
* -
|
|
8
|
+
* 技术路线与平台类型定义(必选)
|
|
9
|
+
* - sdk: 纯 TS/JS SDK 库项目
|
|
10
|
+
* - react: React 前端项目(支持 18/19)
|
|
11
|
+
* - vue: Vue 前端项目(支持 2/3)
|
|
12
|
+
* - node-cli: Node.js 命令行工具
|
|
13
|
+
* - node-server: Node.js 服务端应用
|
|
14
|
+
* - chrome-ext: Chrome 浏览器扩展程序
|
|
15
|
+
* - vscode-ext: VS Code 插件扩展
|
|
11
16
|
*/
|
|
12
|
-
type TechRoute = '
|
|
13
|
-
/**
|
|
14
|
-
* 平台目标类型定义(必选)
|
|
15
|
-
* - nodejs-cli: Node.js 命令行工具(仅支持 TS)
|
|
16
|
-
* - node-server: Node.js 服务端应用(仅支持 TS)
|
|
17
|
-
* - chrome-ext: Chrome 浏览器扩展程序(仅支持 TS)
|
|
18
|
-
* - vscode-ext: VS Code 插件扩展(仅支持 TS)
|
|
19
|
-
* - web: Web 平台应用(预留扩展)
|
|
20
|
-
*/
|
|
21
|
-
type PlatformTarget = 'nodejs-cli' | 'node-server' | 'chrome-ext' | 'vscode-ext' | 'web';
|
|
17
|
+
type TechRoute = 'sdk' | 'react' | 'vue' | 'node-cli' | 'node-server' | 'chrome-ext' | 'vscode-ext';
|
|
22
18
|
/**
|
|
23
19
|
* Webpack 运行模式(必选)
|
|
24
20
|
* - production: 生产模式
|
|
@@ -73,11 +69,9 @@ interface WorkerOptions {
|
|
|
73
69
|
*/
|
|
74
70
|
interface CodaUserConfig {
|
|
75
71
|
/**************************自定义属性************************************ */
|
|
76
|
-
/** 1.
|
|
72
|
+
/** 1. 适配技术路线与平台目标 (必选) */
|
|
77
73
|
techRoute: TechRoute;
|
|
78
|
-
/** 2.
|
|
79
|
-
platformTarget: PlatformTarget;
|
|
80
|
-
/** 3. Webpack 运行模式 (必选) */
|
|
74
|
+
/** 2. Webpack 运行模式 (必选) */
|
|
81
75
|
mode: BuildMode;
|
|
82
76
|
/**************************webpack自身常用属性**************************** */
|
|
83
77
|
/** 1. 脚本入口 entry (必选,继承 Webpack) */
|
|
@@ -171,4 +165,4 @@ interface CodaUserConfig {
|
|
|
171
165
|
declare function resolveWebpackConfig(userConfig: CodaUserConfig, isLogger?: boolean): Configuration;
|
|
172
166
|
|
|
173
167
|
export { resolveWebpackConfig };
|
|
174
|
-
export type { BuildMode, CodaUserConfig, CopyDirectoryRule, CopyRuleItem, CopySingleRule, CopyTemplateRule,
|
|
168
|
+
export type { BuildMode, CodaUserConfig, CopyDirectoryRule, CopyRuleItem, CopySingleRule, CopyTemplateRule, TechRoute, WorkerOptions };
|
package/build/index.d.ts
CHANGED
|
@@ -5,20 +5,16 @@ import TerserPlugin from 'terser-webpack-plugin';
|
|
|
5
5
|
import CompressionPlugin from 'compression-webpack-plugin';
|
|
6
6
|
|
|
7
7
|
/**
|
|
8
|
-
*
|
|
9
|
-
* -
|
|
10
|
-
* -
|
|
8
|
+
* 技术路线与平台类型定义(必选)
|
|
9
|
+
* - sdk: 纯 TS/JS SDK 库项目
|
|
10
|
+
* - react: React 前端项目(支持 18/19)
|
|
11
|
+
* - vue: Vue 前端项目(支持 2/3)
|
|
12
|
+
* - node-cli: Node.js 命令行工具
|
|
13
|
+
* - node-server: Node.js 服务端应用
|
|
14
|
+
* - chrome-ext: Chrome 浏览器扩展程序
|
|
15
|
+
* - vscode-ext: VS Code 插件扩展
|
|
11
16
|
*/
|
|
12
|
-
type TechRoute = '
|
|
13
|
-
/**
|
|
14
|
-
* 平台目标类型定义(必选)
|
|
15
|
-
* - nodejs-cli: Node.js 命令行工具(仅支持 TS)
|
|
16
|
-
* - node-server: Node.js 服务端应用(仅支持 TS)
|
|
17
|
-
* - chrome-ext: Chrome 浏览器扩展程序(仅支持 TS)
|
|
18
|
-
* - vscode-ext: VS Code 插件扩展(仅支持 TS)
|
|
19
|
-
* - web: Web 平台应用(预留扩展)
|
|
20
|
-
*/
|
|
21
|
-
type PlatformTarget = 'nodejs-cli' | 'node-server' | 'chrome-ext' | 'vscode-ext' | 'web';
|
|
17
|
+
type TechRoute = 'sdk' | 'react' | 'vue' | 'node-cli' | 'node-server' | 'chrome-ext' | 'vscode-ext';
|
|
22
18
|
/**
|
|
23
19
|
* Webpack 运行模式(必选)
|
|
24
20
|
* - production: 生产模式
|
|
@@ -73,11 +69,9 @@ interface WorkerOptions {
|
|
|
73
69
|
*/
|
|
74
70
|
interface CodaUserConfig {
|
|
75
71
|
/**************************自定义属性************************************ */
|
|
76
|
-
/** 1.
|
|
72
|
+
/** 1. 适配技术路线与平台目标 (必选) */
|
|
77
73
|
techRoute: TechRoute;
|
|
78
|
-
/** 2.
|
|
79
|
-
platformTarget: PlatformTarget;
|
|
80
|
-
/** 3. Webpack 运行模式 (必选) */
|
|
74
|
+
/** 2. Webpack 运行模式 (必选) */
|
|
81
75
|
mode: BuildMode;
|
|
82
76
|
/**************************webpack自身常用属性**************************** */
|
|
83
77
|
/** 1. 脚本入口 entry (必选,继承 Webpack) */
|
|
@@ -171,4 +165,4 @@ interface CodaUserConfig {
|
|
|
171
165
|
declare function resolveWebpackConfig(userConfig: CodaUserConfig, isLogger?: boolean): Configuration;
|
|
172
166
|
|
|
173
167
|
export { resolveWebpackConfig };
|
|
174
|
-
export type { BuildMode, CodaUserConfig, CopyDirectoryRule, CopyRuleItem, CopySingleRule, CopyTemplateRule,
|
|
168
|
+
export type { BuildMode, CodaUserConfig, CopyDirectoryRule, CopyRuleItem, CopySingleRule, CopyTemplateRule, TechRoute, WorkerOptions };
|