@gct-paas/build 0.1.15 → 0.1.16
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/CHANGELOG.md +6 -0
- package/dist/vite/vite-plugins/inject-importmap-plugin.cjs +3 -0
- package/dist/vite/vite-plugins/inject-importmap-plugin.d.ts +10 -4
- package/es/vite/vite-plugins/inject-importmap-plugin.d.ts +10 -4
- package/es/vite/vite-plugins/inject-importmap-plugin.mjs +3 -0
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -11,6 +11,9 @@ var _util = require("../../util/index.cjs");
|
|
|
11
11
|
function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
|
|
12
12
|
const DEV_IMPORT_MAP_PREFIX = ["/plugin-design/@id/", "/plugin-render-mobile/@id/", "/plugin-render-pad/@id/", "/plugin-render-web/@id/"];
|
|
13
13
|
function injectImportMapPlugin(options = {}) {
|
|
14
|
+
if (options.disabled === true) {
|
|
15
|
+
return void 0;
|
|
16
|
+
}
|
|
14
17
|
const {
|
|
15
18
|
repoUrl = "https://git.gct-china.com/paas/frontend/gct-paas-cdn.git",
|
|
16
19
|
filePath = "extras/import-map.json",
|
|
@@ -7,21 +7,27 @@ import type { Plugin } from 'vite';
|
|
|
7
7
|
*/
|
|
8
8
|
export interface InjectImportMapPluginOptions {
|
|
9
9
|
/**
|
|
10
|
-
*
|
|
10
|
+
* 是否禁用注入 import-map 配置的插件,默认为 false,即启用注入 import-map 配置的插件,设置为 true 则禁用注入 import-map 配置的插件
|
|
11
11
|
*
|
|
12
12
|
* @type {boolean}
|
|
13
13
|
*/
|
|
14
|
+
disabled?: boolean;
|
|
15
|
+
/**
|
|
16
|
+
* 仓库地址,默认为 https://git.gct-china.com/paas/frontend/gct-paas-cdn.git
|
|
17
|
+
*
|
|
18
|
+
* @type {string}
|
|
19
|
+
*/
|
|
14
20
|
repoUrl?: string;
|
|
15
21
|
/**
|
|
16
22
|
* 需要读取的文件路径,默认为 extras/import-map.json
|
|
17
23
|
*
|
|
18
|
-
* @type {
|
|
24
|
+
* @type {string}
|
|
19
25
|
*/
|
|
20
26
|
filePath?: string;
|
|
21
27
|
/**
|
|
22
28
|
* 指定分支,若未指定则自动获取当前主工程对应的分支
|
|
23
29
|
*
|
|
24
|
-
* @type {
|
|
30
|
+
* @type {string}
|
|
25
31
|
*/
|
|
26
32
|
branch?: string;
|
|
27
33
|
/**
|
|
@@ -34,4 +40,4 @@ export interface InjectImportMapPluginOptions {
|
|
|
34
40
|
/**
|
|
35
41
|
* 编译时读取并注入 import-map 配置的插件
|
|
36
42
|
*/
|
|
37
|
-
export declare function injectImportMapPlugin(options?: InjectImportMapPluginOptions): Plugin;
|
|
43
|
+
export declare function injectImportMapPlugin(options?: InjectImportMapPluginOptions): Plugin | undefined;
|
|
@@ -7,21 +7,27 @@ import type { Plugin } from 'vite';
|
|
|
7
7
|
*/
|
|
8
8
|
export interface InjectImportMapPluginOptions {
|
|
9
9
|
/**
|
|
10
|
-
*
|
|
10
|
+
* 是否禁用注入 import-map 配置的插件,默认为 false,即启用注入 import-map 配置的插件,设置为 true 则禁用注入 import-map 配置的插件
|
|
11
11
|
*
|
|
12
12
|
* @type {boolean}
|
|
13
13
|
*/
|
|
14
|
+
disabled?: boolean;
|
|
15
|
+
/**
|
|
16
|
+
* 仓库地址,默认为 https://git.gct-china.com/paas/frontend/gct-paas-cdn.git
|
|
17
|
+
*
|
|
18
|
+
* @type {string}
|
|
19
|
+
*/
|
|
14
20
|
repoUrl?: string;
|
|
15
21
|
/**
|
|
16
22
|
* 需要读取的文件路径,默认为 extras/import-map.json
|
|
17
23
|
*
|
|
18
|
-
* @type {
|
|
24
|
+
* @type {string}
|
|
19
25
|
*/
|
|
20
26
|
filePath?: string;
|
|
21
27
|
/**
|
|
22
28
|
* 指定分支,若未指定则自动获取当前主工程对应的分支
|
|
23
29
|
*
|
|
24
|
-
* @type {
|
|
30
|
+
* @type {string}
|
|
25
31
|
*/
|
|
26
32
|
branch?: string;
|
|
27
33
|
/**
|
|
@@ -34,4 +40,4 @@ export interface InjectImportMapPluginOptions {
|
|
|
34
40
|
/**
|
|
35
41
|
* 编译时读取并注入 import-map 配置的插件
|
|
36
42
|
*/
|
|
37
|
-
export declare function injectImportMapPlugin(options?: InjectImportMapPluginOptions): Plugin;
|
|
43
|
+
export declare function injectImportMapPlugin(options?: InjectImportMapPluginOptions): Plugin | undefined;
|
|
@@ -4,6 +4,9 @@ import { simpleGit } from "simple-git";
|
|
|
4
4
|
import { isBuildPluginEnv } from "../../util/index.mjs";
|
|
5
5
|
const DEV_IMPORT_MAP_PREFIX = ["/plugin-design/@id/", "/plugin-render-mobile/@id/", "/plugin-render-pad/@id/", "/plugin-render-web/@id/"];
|
|
6
6
|
export function injectImportMapPlugin(options = {}) {
|
|
7
|
+
if (options.disabled === true) {
|
|
8
|
+
return void 0;
|
|
9
|
+
}
|
|
7
10
|
const {
|
|
8
11
|
repoUrl = "https://git.gct-china.com/paas/frontend/gct-paas-cdn.git",
|
|
9
12
|
filePath = "extras/import-map.json",
|