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