@umijs/utils 4.6.67 → 4.6.69
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.
|
@@ -37,10 +37,6 @@ var import_path = require("path");
|
|
|
37
37
|
var import_fs_extra = __toESM(require("../../compiled/fs-extra"));
|
|
38
38
|
var import_Generator = __toESM(require("../Generator/Generator"));
|
|
39
39
|
var BaseGenerator = class extends import_Generator.default {
|
|
40
|
-
path;
|
|
41
|
-
target;
|
|
42
|
-
data;
|
|
43
|
-
questions;
|
|
44
40
|
constructor({
|
|
45
41
|
path,
|
|
46
42
|
target,
|
|
@@ -2,8 +2,8 @@ import prompts from '../../compiled/prompts';
|
|
|
2
2
|
declare const generateFile: ({ path, target, baseDir, data, questions, }: {
|
|
3
3
|
path: string;
|
|
4
4
|
target: string;
|
|
5
|
-
baseDir?: string
|
|
5
|
+
baseDir?: string;
|
|
6
6
|
data?: any;
|
|
7
|
-
questions?: prompts.PromptObject
|
|
7
|
+
questions?: prompts.PromptObject[];
|
|
8
8
|
}) => Promise<void>;
|
|
9
9
|
export default generateFile;
|
|
@@ -40,10 +40,6 @@ var import_glob = __toESM(require("../../compiled/glob"));
|
|
|
40
40
|
var import_mustache = __toESM(require("../../compiled/mustache"));
|
|
41
41
|
var import_prompts = __toESM(require("../../compiled/prompts"));
|
|
42
42
|
var Generator = class {
|
|
43
|
-
baseDir;
|
|
44
|
-
args;
|
|
45
|
-
slient;
|
|
46
|
-
prompts;
|
|
47
43
|
constructor({ baseDir, args, slient }) {
|
|
48
44
|
this.baseDir = baseDir;
|
|
49
45
|
this.args = args;
|
|
@@ -83,7 +79,8 @@ var Generator = class {
|
|
|
83
79
|
});
|
|
84
80
|
files.forEach((file) => {
|
|
85
81
|
const absFile = (0, import_path.join)(opts.path, file);
|
|
86
|
-
if ((0, import_fs.statSync)(absFile).isDirectory())
|
|
82
|
+
if ((0, import_fs.statSync)(absFile).isDirectory())
|
|
83
|
+
return;
|
|
87
84
|
if (file.endsWith(".tpl")) {
|
|
88
85
|
this.copyTpl({
|
|
89
86
|
templatePath: absFile,
|
package/dist/isStyleFile.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
export declare const AUTO_CSS_MODULE_EXTS: string[];
|
|
2
2
|
export declare const isStyleFile: ({ filename, }: {
|
|
3
|
-
filename?: string
|
|
4
|
-
ext?: string
|
|
5
|
-
}) =>
|
|
3
|
+
filename?: string;
|
|
4
|
+
ext?: string;
|
|
5
|
+
}) => "" | boolean | undefined;
|
package/dist/npmClient.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export
|
|
1
|
+
export type NpmClient = 'npm' | 'cnpm' | 'tnpm' | 'yarn' | 'pnpm';
|
|
2
2
|
export declare const npmClients: string[];
|
|
3
3
|
export declare enum NpmClientEnum {
|
|
4
4
|
pnpm = "pnpm",
|
|
@@ -12,5 +12,5 @@ export declare const getNpmClient: (opts: {
|
|
|
12
12
|
}) => NpmClient;
|
|
13
13
|
export declare const installWithNpmClient: ({ npmClient, cwd, }: {
|
|
14
14
|
npmClient: NpmClient;
|
|
15
|
-
cwd?: string
|
|
15
|
+
cwd?: string;
|
|
16
16
|
}) => void;
|
package/dist/tryPaths.js
CHANGED
|
@@ -25,7 +25,8 @@ module.exports = __toCommonJS(tryPaths_exports);
|
|
|
25
25
|
var import_fs = require("fs");
|
|
26
26
|
function tryPaths(paths) {
|
|
27
27
|
for (const path of paths) {
|
|
28
|
-
if ((0, import_fs.existsSync)(path))
|
|
28
|
+
if ((0, import_fs.existsSync)(path))
|
|
29
|
+
return path;
|
|
29
30
|
}
|
|
30
31
|
}
|
|
31
32
|
// Annotate the CommonJS export names for ESM import in node:
|