@modern-js/repo-generator 0.0.0-next-20241015072043 → 0.0.0-next-20241016023623

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.
Files changed (3) hide show
  1. package/dist/index.js +423 -402
  2. package/package.json +4 -3
  3. package/src/index.ts +10 -2
package/package.json CHANGED
@@ -15,7 +15,7 @@
15
15
  "modern",
16
16
  "modern.js"
17
17
  ],
18
- "version": "0.0.0-next-20241015072043",
18
+ "version": "0.0.0-next-20241016023623",
19
19
  "jsnext:source": "./src/index.ts",
20
20
  "main": "./dist/index.js",
21
21
  "files": [
@@ -26,8 +26,9 @@
26
26
  "@modern-js/codesmith": "2.6.0",
27
27
  "@types/node": "^14",
28
28
  "typescript": "^5",
29
- "@modern-js/repo-next-generator": "0.0.0-next-20241015072043",
30
- "@scripts/build": "0.0.0-next-20241015072043"
29
+ "@modern-js/generator-utils": "0.0.0-next-20241016023623",
30
+ "@scripts/build": "0.0.0-next-20241016023623",
31
+ "@modern-js/repo-next-generator": "0.0.0-next-20241016023623"
31
32
  },
32
33
  "sideEffects": false,
33
34
  "publishConfig": {
package/src/index.ts CHANGED
@@ -3,12 +3,14 @@ import {
3
3
  type GeneratorContext,
4
4
  type GeneratorCore,
5
5
  } from '@modern-js/codesmith';
6
+ import { getGeneratorPath } from '@modern-js/generator-utils';
6
7
 
7
8
  export default async (context: GeneratorContext, generator: GeneratorCore) => {
8
9
  process.setMaxListeners(20);
9
10
 
10
- // check prepare global
11
+ generator.logger.debug(`🚀 [Start Run Repo Generator]`);
11
12
 
13
+ // check prepare global
12
14
  if (!(global as any).codesmith) {
13
15
  generator.logger.warn(
14
16
  '🟡 Please use the latest @modern-js/create version to run generator',
@@ -17,7 +19,13 @@ export default async (context: GeneratorContext, generator: GeneratorCore) => {
17
19
  await codesmith.prepareGlobal();
18
20
  }
19
21
 
20
- generator.logger.debug(`🚀 [Start Run Repo Generator]`);
22
+ const RepoNextGeneratort = '@modern-js/repo-next-generator';
23
+
24
+ await generator.runSubGenerator(
25
+ getGeneratorPath(RepoNextGeneratort, context.config.distTag, [__dirname]),
26
+ undefined,
27
+ context.config,
28
+ );
21
29
 
22
30
  generator.logger.debug(`🚀 [End Run Repo Generator]`);
23
31
  };