easy-soft-develop 2.1.124 → 2.1.128
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/package.json +1 -1
- package/src/templates/babel.config.template.js +22 -1
- package/src/templates/eslint.template.js +1 -1
- package/src/tools/initial.environment.js +3 -3
- package/src/tools/package.tools.js +4 -2
- package/types/templates/babel.config.template.d.ts +1 -1
- package/types/tools/package.tools.d.ts +10 -2
package/package.json
CHANGED
|
@@ -1,13 +1,34 @@
|
|
|
1
|
+
const { isArray } = require('../tools/meta');
|
|
2
|
+
const {
|
|
3
|
+
getDevelopSubPathVersionNcuConfig,
|
|
4
|
+
} = require('../config/develop.subPath.version.ncu');
|
|
1
5
|
const { fileGlobalHeader } = require('./template.config');
|
|
2
6
|
|
|
3
7
|
const folderPath = '.';
|
|
4
8
|
|
|
9
|
+
const developSubPathVersionNcuConfig = getDevelopSubPathVersionNcuConfig();
|
|
10
|
+
|
|
11
|
+
const { paths = [] } = {
|
|
12
|
+
paths: [],
|
|
13
|
+
...developSubPathVersionNcuConfig,
|
|
14
|
+
};
|
|
15
|
+
|
|
5
16
|
const contentFileContent = `${fileGlobalHeader}
|
|
6
17
|
function buildConfig(api) {
|
|
7
18
|
api.cache(true);
|
|
8
19
|
|
|
9
20
|
return {
|
|
10
|
-
babelrcRoots: ['.'
|
|
21
|
+
babelrcRoots: ['.'${
|
|
22
|
+
!isArray(paths)
|
|
23
|
+
? ''
|
|
24
|
+
: paths.length === 0
|
|
25
|
+
? ''
|
|
26
|
+
: `, ${paths
|
|
27
|
+
.map((o) => {
|
|
28
|
+
return `'${o}/*'`;
|
|
29
|
+
})
|
|
30
|
+
.join(',')}`
|
|
31
|
+
}],
|
|
11
32
|
};
|
|
12
33
|
}
|
|
13
34
|
|
|
@@ -103,15 +103,15 @@ function adjustMainPackageJsonScript({ scripts }) {
|
|
|
103
103
|
const testScript = {};
|
|
104
104
|
const testAllProjects = [];
|
|
105
105
|
|
|
106
|
-
loopPackage(({ name }) => {
|
|
106
|
+
loopPackage(({ name, path }) => {
|
|
107
107
|
publishPackageNameList.push(name);
|
|
108
108
|
|
|
109
109
|
autoAdjustFileScript[`z:auto:adjust:file:${name}`] =
|
|
110
|
-
`cd
|
|
110
|
+
`cd ${path}/${name} && npm run z:auto:adjust:file`;
|
|
111
111
|
|
|
112
112
|
autoAdjustFileAllProjects.push(`npm run z:auto:adjust:file:${name}`);
|
|
113
113
|
|
|
114
|
-
testScript[`test:${name}`] = `cd
|
|
114
|
+
testScript[`test:${name}`] = `cd ${path}/${name} && npm run z:test`;
|
|
115
115
|
|
|
116
116
|
testAllProjects.push(`npm run test:${name}`);
|
|
117
117
|
});
|
|
@@ -8,8 +8,10 @@ const {
|
|
|
8
8
|
/**
|
|
9
9
|
* loop all package
|
|
10
10
|
*/
|
|
11
|
-
|
|
12
|
-
|
|
11
|
+
function loopPackage(
|
|
12
|
+
// eslint-disable-next-line no-unused-vars
|
|
13
|
+
callback = ({ name, path, absolutePath, relativePath }) => {},
|
|
14
|
+
) {
|
|
13
15
|
const developSubPathVersionNcuConfig = getDevelopSubPathVersionNcuConfig();
|
|
14
16
|
|
|
15
17
|
const { paths = [] } = {
|
|
@@ -4,5 +4,5 @@ export namespace contentFile {
|
|
|
4
4
|
export let coverFile: boolean;
|
|
5
5
|
export { contentFileContent as fileContent };
|
|
6
6
|
}
|
|
7
|
-
declare const contentFileContent:
|
|
7
|
+
declare const contentFileContent: string;
|
|
8
8
|
export {};
|
|
@@ -1,8 +1,16 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* loop all package
|
|
3
3
|
*/
|
|
4
|
-
export function loopPackage(
|
|
4
|
+
export function loopPackage(
|
|
5
|
+
callback?: ({
|
|
6
|
+
name,
|
|
7
|
+
path,
|
|
8
|
+
absolutePath,
|
|
9
|
+
relativePath,
|
|
10
|
+
}: {
|
|
5
11
|
name: any;
|
|
12
|
+
path: any;
|
|
6
13
|
absolutePath: any;
|
|
7
14
|
relativePath: any;
|
|
8
|
-
}) => void
|
|
15
|
+
}) => void,
|
|
16
|
+
): void;
|