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 CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "easy-soft-develop",
3
- "version": "2.1.124",
3
+ "version": "2.1.128",
4
4
  "description": "",
5
5
  "homepage": "https://github.com/kityandhero/easy-soft-develop#readme",
6
6
  "bugs": {
@@ -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: ['.', 'packages/*'],
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
 
@@ -303,7 +303,7 @@ const items = {
303
303
  ? ''
304
304
  : `, ${paths
305
305
  .map((o) => {
306
- return `./${o}/*/tsconfig.json`;
306
+ return `'./${o}/*/tsconfig.json'`;
307
307
  })
308
308
  .join(',')}`
309
309
  }],
@@ -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 packages/${name} && npm run z:auto:adjust:file`;
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 packages/${name} && npm run z:test`;
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
- // eslint-disable-next-line no-unused-vars
12
- function loopPackage(callback = ({ name, absolutePath, relativePath }) => {}) {
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: "/* eslint-disable no-undef */\n/* eslint-disable import/no-commonjs */\n/* eslint-disable unicorn/prefer-module */\n/* eslint-disable no-useless-escape */\n\nfunction buildConfig(api) {\n api.cache(true);\n\n return {\n babelrcRoots: ['.', 'packages/*'],\n };\n}\n\nmodule.exports = buildConfig;\n";
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(callback?: ({ name, absolutePath, relativePath }: {
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): void;
15
+ }) => void,
16
+ ): void;