@es-pkg/publish 1.0.7 → 1.0.8
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/cjs/index.js +238 -227
- package/package.json +1 -1
package/cjs/index.js
CHANGED
|
@@ -1,242 +1,253 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
var
|
|
6
|
-
var
|
|
7
|
-
var
|
|
8
|
-
var
|
|
9
|
-
var
|
|
10
|
-
var
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
3
|
+
var __create = Object.create;
|
|
4
|
+
var __defProp = Object.defineProperty;
|
|
5
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
6
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
7
|
+
var __getProtoOf = Object.getPrototypeOf;
|
|
8
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
9
|
+
var __export = (target, all) => {
|
|
10
|
+
for (var name in all)
|
|
11
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
12
|
+
};
|
|
13
|
+
var __copyProps = (to, from, except, desc) => {
|
|
14
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
15
|
+
for (let key of __getOwnPropNames(from))
|
|
16
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
17
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
18
|
+
}
|
|
19
|
+
return to;
|
|
20
|
+
};
|
|
21
|
+
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
|
|
22
|
+
// If the importer is in node compatibility mode or this is not an ESM
|
|
23
|
+
// file that has been converted to a CommonJS file using a Babel-
|
|
24
|
+
// compatible transform (i.e. "__esModule" has not been set), then set
|
|
25
|
+
// "default" to the CommonJS "module.exports" for node compatibility.
|
|
26
|
+
!mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
|
|
27
|
+
mod
|
|
28
|
+
));
|
|
29
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
30
|
+
var src_exports = {};
|
|
31
|
+
__export(src_exports, {
|
|
32
|
+
default: () => src_default
|
|
33
|
+
});
|
|
34
|
+
module.exports = __toCommonJS(src_exports);
|
|
35
|
+
var import_gulp = __toESM(require("@es-pkg/gulp"));
|
|
36
|
+
var import_chalk = __toESM(require("chalk"));
|
|
37
|
+
var import_gulp_logger = __toESM(require("@es-pkg/gulp-logger"));
|
|
38
|
+
var import_fs = __toESM(require("fs"));
|
|
39
|
+
var import_path = __toESM(require("path"));
|
|
40
|
+
var import_utils = require("@es-pkg/utils");
|
|
41
|
+
var import_config = require("@es-pkg/config");
|
|
42
|
+
var import_prompts = __toESM(require("prompts"));
|
|
14
43
|
const scoped = /^@[a-zA-Z0-9-]+\/.+$/;
|
|
15
|
-
const REGISTRY =
|
|
16
|
-
const json =
|
|
17
|
-
const publishDir =
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
}
|
|
44
|
+
const REGISTRY = import_config.config.publishRegistry;
|
|
45
|
+
const json = import_config.pkg;
|
|
46
|
+
const publishDir = import_path.default.join(import_config.config.publishDir, "./__npm__");
|
|
47
|
+
import_gulp.default.task("clean", async () => {
|
|
48
|
+
(0, import_utils.log)(`\u6E05\u9664${publishDir}\u5F00\u59CB`);
|
|
49
|
+
try {
|
|
50
|
+
await (0, import_utils.remove)(publishDir);
|
|
51
|
+
(0, import_utils.log)(`\u6E05\u9664${publishDir}\u5B8C\u6210`);
|
|
52
|
+
} catch (e) {
|
|
53
|
+
(0, import_utils.log)(`\u6E05\u9664${publishDir}\u5931\u8D25\uFF1A`, e);
|
|
54
|
+
}
|
|
27
55
|
});
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
56
|
+
import_gulp.default.task("del-cjs-iife-es", async () => {
|
|
57
|
+
if (import_config.config.iife) {
|
|
58
|
+
(0, import_utils.log)(`\u5220\u9664 ${import_path.default.join(`${publishDir}`, import_config.config.iife)} \u5F00\u59CB`);
|
|
59
|
+
await (0, import_utils.remove)(`${import_path.default.join(`${publishDir}`, import_config.config.iife)}`);
|
|
60
|
+
(0, import_utils.log)(`\u5220\u9664 ${import_path.default.join(`${publishDir}`, import_config.config.iife)} \u7ED3\u675F`);
|
|
61
|
+
}
|
|
62
|
+
(0, import_utils.log)(`\u5220\u9664 ${import_path.default.join(`${publishDir}`, import_config.config.cjs)} \u5F00\u59CB`);
|
|
63
|
+
await (0, import_utils.remove)(`${import_path.default.join(`${publishDir}`, import_config.config.cjs)}`);
|
|
64
|
+
(0, import_utils.log)(`\u5220\u9664 ${import_path.default.join(`${publishDir}`, import_config.config.cjs)} \u7ED3\u675F`);
|
|
65
|
+
(0, import_utils.log)(`\u5220\u9664 ${import_path.default.join(`${publishDir}`, import_config.config.es)} \u5F00\u59CB`);
|
|
66
|
+
await (0, import_utils.remove)(`${import_path.default.join(`${publishDir}`, import_config.config.es)}`);
|
|
67
|
+
(0, import_utils.log)(`\u5220\u9664 ${import_path.default.join(`${publishDir}`, import_config.config.es)} \u7ED3\u675F`);
|
|
40
68
|
});
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
}
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
utils.log(`生成 .npmrc 完成`);
|
|
145
|
-
utils.log(`拷贝 README 开始`);
|
|
69
|
+
import_gulp.default.task("copy-info", (0, import_gulp.series)(async () => {
|
|
70
|
+
(0, import_utils.log)(`\u751F\u6210 package \u5F00\u59CB`);
|
|
71
|
+
let errored = false;
|
|
72
|
+
let version = "";
|
|
73
|
+
try {
|
|
74
|
+
const { stdout } = await (0, import_utils.run)(`npm`, ["view", import_config.pkg.name, "version"], {
|
|
75
|
+
stdio: void 0,
|
|
76
|
+
cwd: import_path.default.join(process.cwd(), import_config.config.publishDir)
|
|
77
|
+
});
|
|
78
|
+
if (stdout) {
|
|
79
|
+
version = stdout;
|
|
80
|
+
}
|
|
81
|
+
if (!version) {
|
|
82
|
+
const controller = new AbortController();
|
|
83
|
+
const timer = setTimeout(() => {
|
|
84
|
+
controller.abort();
|
|
85
|
+
}, 3e3);
|
|
86
|
+
const start = Date.now();
|
|
87
|
+
const url = `https://img.shields.io/npm/v/${import_config.pkg.name}`;
|
|
88
|
+
const response = await (0, import_utils.fetch)(url, {
|
|
89
|
+
signal: controller.signal
|
|
90
|
+
}).finally(async () => {
|
|
91
|
+
import_utils.log.warn(`\u8FDC\u7A0B\u83B7\u53D6\u7248\u672C\u82B1\u8D39\u65F6\u95F4:${Date.now() - start}`);
|
|
92
|
+
});
|
|
93
|
+
const htmlString = await response.text();
|
|
94
|
+
const regex = /<title>npm: v([\d.]+)<\/title>/;
|
|
95
|
+
version = htmlString.match(regex)?.[1];
|
|
96
|
+
clearTimeout(timer);
|
|
97
|
+
}
|
|
98
|
+
(0, import_utils.log)(`\u8FDC\u7A0B\u83B7\u53D6\u7248\u672C\u4FE1\u606F tag:`, version);
|
|
99
|
+
if (version) {
|
|
100
|
+
json.version = (0, import_utils.compare)(import_config.pkg.version, version) <= 0 ? (0, import_utils.autoUpgrade)(version) : import_config.pkg.version;
|
|
101
|
+
} else {
|
|
102
|
+
errored = true;
|
|
103
|
+
}
|
|
104
|
+
} catch (e) {
|
|
105
|
+
errored = true;
|
|
106
|
+
}
|
|
107
|
+
if (errored) {
|
|
108
|
+
const { version: version2 } = await (0, import_prompts.default)({
|
|
109
|
+
type: "text",
|
|
110
|
+
name: "version",
|
|
111
|
+
message: "\u8FDC\u7A0B\u83B7\u53D6\u7248\u672C\u5931\u8D25\uFF01\u8BF7\u8F93\u5165\u7248\u672C\u53F7",
|
|
112
|
+
initial: import_config.pkg.version
|
|
113
|
+
});
|
|
114
|
+
json.version = version2;
|
|
115
|
+
}
|
|
116
|
+
delete json.devDependencies;
|
|
117
|
+
delete json.scripts;
|
|
118
|
+
if (!json.publishConfig) {
|
|
119
|
+
json.publishConfig = {
|
|
120
|
+
access: "public",
|
|
121
|
+
registry: REGISTRY
|
|
122
|
+
};
|
|
123
|
+
}
|
|
124
|
+
const es = import_path.default.basename(import_config.config.es);
|
|
125
|
+
const cjs = import_path.default.basename(import_config.config.cjs);
|
|
126
|
+
const iife = import_config.config.iife ? import_path.default.basename(import_config.config.iife) : "";
|
|
127
|
+
const CJSExists = import_fs.default.existsSync(import_path.default.join(`${import_config.config.publishDir}`, cjs));
|
|
128
|
+
const ESExists = import_fs.default.existsSync(import_path.default.join(`${import_config.config.publishDir}`, es));
|
|
129
|
+
const IIFEExists = iife ? import_fs.default.existsSync(import_path.default.join(`${import_config.config.publishDir}`, iife)) : false;
|
|
130
|
+
const mainExists = !!json.main && import_fs.default.existsSync(import_path.default.join((0, import_config.resolveApp)(""), json.main));
|
|
131
|
+
const browserExists = !!json.browser && import_fs.default.existsSync(import_path.default.join((0, import_config.resolveApp)(""), json.main));
|
|
132
|
+
const moduleExists = !!json.module && import_fs.default.existsSync(import_path.default.join((0, import_config.resolveApp)(""), json.main));
|
|
133
|
+
const _es = (0, import_config.getEntrypoint)(import_config.config.es);
|
|
134
|
+
const _cjs = (0, import_config.getEntrypoint)(import_config.config.cjs);
|
|
135
|
+
if (!mainExists) {
|
|
136
|
+
if (ESExists) {
|
|
137
|
+
json.main = _es || _cjs;
|
|
138
|
+
}
|
|
139
|
+
if (CJSExists) {
|
|
140
|
+
json.main = _cjs || _es;
|
|
141
|
+
}
|
|
142
|
+
}
|
|
143
|
+
if (!moduleExists && CJSExists) {
|
|
144
|
+
json.module = _es || _cjs;
|
|
145
|
+
}
|
|
146
|
+
if (!browserExists && IIFEExists) {
|
|
147
|
+
json.browser = (0, import_config.getEntrypoint)(import_config.config.iife);
|
|
148
|
+
}
|
|
149
|
+
if (!json.types) {
|
|
150
|
+
const type = (0, import_config.getEntrypoint)(import_config.config.es, import_config.config.typings) || _es || _cjs;
|
|
151
|
+
const { dir, name, ext } = import_path.default.parse(type);
|
|
152
|
+
json.types = [".ts", ".tsx"].includes(ext) ? type : `${dir}/${name}.d.ts`;
|
|
153
|
+
}
|
|
154
|
+
json.files = Array.from(/* @__PURE__ */ new Set([ESExists && es, CJSExists && cjs, IIFEExists && iife])).filter(Boolean);
|
|
155
|
+
json.dependencies = Object.fromEntries(Object.entries(json.dependencies).map(([key, value]) => {
|
|
156
|
+
if (value.startsWith("file://") || value.startsWith("workspace:")) {
|
|
157
|
+
return [key, "latest"];
|
|
158
|
+
}
|
|
159
|
+
return [key, value];
|
|
160
|
+
}));
|
|
161
|
+
let jsonStr = JSON.stringify(json, null, " ");
|
|
162
|
+
const ex = import_fs.default.existsSync(`${import_config.config.publishDir}/`);
|
|
163
|
+
if (!ex) {
|
|
164
|
+
import_fs.default.mkdirSync(`${import_config.config.publishDir}/`, { recursive: true });
|
|
165
|
+
}
|
|
166
|
+
import_fs.default.writeFileSync(`${import_config.config.publishDir}/package.json`, jsonStr);
|
|
167
|
+
(0, import_utils.log)(`\u751F\u6210 package\u5B8C\u6210`, import_chalk.default.green(json.version));
|
|
168
|
+
(0, import_utils.log)(`\u751F\u6210 .npmrc \u5F00\u59CB`);
|
|
169
|
+
import_fs.default.writeFileSync(`${import_config.config.publishDir}/.npmrc`, `registry=${REGISTRY}`);
|
|
170
|
+
(0, import_utils.log)(`\u751F\u6210 .npmrc \u5B8C\u6210`);
|
|
171
|
+
(0, import_utils.log)(`\u62F7\u8D1D README \u5F00\u59CB`);
|
|
146
172
|
}, () => {
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
}))
|
|
153
|
-
.pipe(gulp.dest(`${config.config.publishDir}/`));
|
|
173
|
+
return import_gulp.default.src([`./README.md`]).pipe((0, import_gulp_logger.default)({
|
|
174
|
+
before: "copy README...",
|
|
175
|
+
after: "copy README complete!",
|
|
176
|
+
showChange: false
|
|
177
|
+
})).pipe(import_gulp.default.dest(`${import_config.config.publishDir}/`));
|
|
154
178
|
}));
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
}))
|
|
166
|
-
.pipe(gulp.dest(path.join(`${publishDir}`, path.basename(config.config.iife))));
|
|
179
|
+
import_gulp.default.task("copy-iife", (c) => {
|
|
180
|
+
if (!import_config.config.iife) {
|
|
181
|
+
return c();
|
|
182
|
+
}
|
|
183
|
+
(0, import_utils.log)(`\u62F7\u8D1D '/iife/**' \u5F00\u59CB`);
|
|
184
|
+
return import_gulp.default.src([`${import_config.config.iife}/.**`, `${import_config.config.iife}/**`]).pipe((0, import_gulp_logger.default)({
|
|
185
|
+
before: "copy iife...",
|
|
186
|
+
after: "copy iife complete!",
|
|
187
|
+
showChange: false
|
|
188
|
+
})).pipe(import_gulp.default.dest(import_path.default.join(`${publishDir}`, import_path.default.basename(import_config.config.iife))));
|
|
167
189
|
});
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
}))
|
|
175
|
-
.pipe(gulp.dest(path.join(`${publishDir}`, path.basename(config.config.cjs))));
|
|
190
|
+
import_gulp.default.task("copy-cjs", () => {
|
|
191
|
+
return import_gulp.default.src([`${import_config.config.cjs}/.**`, `${import_config.config.cjs}/**`]).pipe((0, import_gulp_logger.default)({
|
|
192
|
+
before: "copy cjs...",
|
|
193
|
+
after: "copy cjs complete!",
|
|
194
|
+
showChange: false
|
|
195
|
+
})).pipe(import_gulp.default.dest(import_path.default.join(`${publishDir}`, import_path.default.basename(import_config.config.cjs))));
|
|
176
196
|
});
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
}))
|
|
184
|
-
.pipe(gulp.dest(path.join(`${publishDir}`, path.basename(config.config.es))));
|
|
197
|
+
import_gulp.default.task("copy-es", () => {
|
|
198
|
+
return import_gulp.default.src([`${import_config.config.es}/.**`, `${import_config.config.es}/**`]).pipe((0, import_gulp_logger.default)({
|
|
199
|
+
before: "copy es...",
|
|
200
|
+
after: "copy es complete!",
|
|
201
|
+
showChange: false
|
|
202
|
+
})).pipe(import_gulp.default.dest(import_path.default.join(`${publishDir}`, import_path.default.basename(import_config.config.es))));
|
|
185
203
|
});
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
204
|
+
import_gulp.default.task("remove-__npm__", (0, import_gulp.series)(() => {
|
|
205
|
+
let promises = [];
|
|
206
|
+
const includes = [import_config.config.es, import_config.config.cjs, import_config.config.iife].flatMap((val) => {
|
|
207
|
+
if (!val) {
|
|
208
|
+
return [];
|
|
209
|
+
}
|
|
210
|
+
const some = (0, import_config.getIncludeFiles)().some((item) => import_path.default.resolve(val).startsWith(import_path.default.resolve(item.path)));
|
|
211
|
+
return some ? [] : [val];
|
|
212
|
+
});
|
|
213
|
+
promises = includes.map((item) => (0, import_utils.remove)(item));
|
|
214
|
+
return Promise.all(promises);
|
|
197
215
|
}, () => {
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
}))
|
|
204
|
-
.pipe(gulp.dest(`${config.config.publishDir}/`));
|
|
216
|
+
return import_gulp.default.src([`${publishDir}/**`, `${publishDir}/.**`]).pipe((0, import_gulp_logger.default)({
|
|
217
|
+
before: "copy __npm__...",
|
|
218
|
+
after: "copy __npm__ complete!",
|
|
219
|
+
showChange: false
|
|
220
|
+
})).pipe(import_gulp.default.dest(`${import_config.config.publishDir}/`));
|
|
205
221
|
}, async () => {
|
|
206
|
-
|
|
222
|
+
await (0, import_utils.remove)(publishDir);
|
|
207
223
|
}));
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
}
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
224
|
+
import_gulp.default.task("npm-publish", async function() {
|
|
225
|
+
let publishAccess = [];
|
|
226
|
+
if (scoped.test(import_config.pkg.name)) {
|
|
227
|
+
publishAccess = ["--access", "public"];
|
|
228
|
+
}
|
|
229
|
+
if (import_config.config.publishAccess) {
|
|
230
|
+
publishAccess = import_config.config.publishAccess;
|
|
231
|
+
}
|
|
232
|
+
try {
|
|
233
|
+
const { stdout } = await (0, import_utils.run)(`npm`, ["whoami", "--registry", REGISTRY], { stdio: void 0 });
|
|
234
|
+
import_utils.log.warn(`===npm\u767B\u5F55\u4FE1\u606F===>${stdout}`);
|
|
235
|
+
} catch (e) {
|
|
236
|
+
import_utils.log.warn(`===npm${REGISTRY}\u672A\u767B\u5F55\uFF01\uFF01\u8BF7\u767B\u5F55`);
|
|
237
|
+
await (0, import_utils.run)(`npm`, ["login", "--registry", REGISTRY]);
|
|
238
|
+
}
|
|
239
|
+
const { confirm } = await (0, import_prompts.default)({
|
|
240
|
+
type: "confirm",
|
|
241
|
+
name: "confirm",
|
|
242
|
+
message: "\u662F\u5426\u53D1\u5E03\uFF1F"
|
|
243
|
+
});
|
|
244
|
+
if (confirm) {
|
|
245
|
+
await (0, import_utils.run)(`npm`, ["publish", ...publishAccess, "--registry", REGISTRY], {
|
|
246
|
+
cwd: import_path.default.join(process.cwd(), import_config.config.publishDir)
|
|
229
247
|
});
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
utils.success(`${json.name}@${json.version}:发布成功!`);
|
|
235
|
-
}
|
|
236
|
-
else {
|
|
237
|
-
utils.error(`${json.name}@${json.version}:取消成功!`);
|
|
238
|
-
}
|
|
248
|
+
(0, import_utils.success)(`${json.name}@${json.version}:\u53D1\u5E03\u6210\u529F\uFF01`);
|
|
249
|
+
} else {
|
|
250
|
+
(0, import_utils.error)(`${json.name}@${json.version}:\u53D6\u6D88\u6210\u529F\uFF01`);
|
|
251
|
+
}
|
|
239
252
|
});
|
|
240
|
-
var
|
|
241
|
-
|
|
242
|
-
exports.default = index;
|
|
253
|
+
var src_default = import_gulp.default.series("clean", "del-cjs-iife-es", "copy-cjs", "copy-es", "copy-iife", "remove-__npm__", "copy-info", "npm-publish");
|