create-egg 3.0.0 → 4.0.1-beta.0

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 (86) hide show
  1. package/README.md +55 -16
  2. package/dist/cli.d.ts +1 -0
  3. package/dist/cli.js +11 -0
  4. package/dist/index.d.ts +4 -0
  5. package/dist/index.js +254 -0
  6. package/dist/templates/egg3-simple-js/.eslintignore +1 -0
  7. package/dist/templates/egg3-simple-js/.eslintrc +4 -0
  8. package/dist/templates/egg3-simple-js/.vscode/launch.json +26 -0
  9. package/dist/templates/egg3-simple-js/README.md +31 -0
  10. package/dist/templates/egg3-simple-js/_.gitignore +15 -0
  11. package/dist/templates/egg3-simple-js/app/controller/home.js +10 -0
  12. package/dist/templates/egg3-simple-js/app/router.js +7 -0
  13. package/dist/templates/egg3-simple-js/config/config.default.js +28 -0
  14. package/dist/templates/egg3-simple-js/config/plugin.js +7 -0
  15. package/dist/templates/egg3-simple-js/package.json +38 -0
  16. package/dist/templates/egg3-simple-js/test/app/controller/home.test.js +20 -0
  17. package/dist/templates/egg3-simple-ts/.eslintignore +3 -0
  18. package/dist/templates/egg3-simple-ts/.eslintrc +6 -0
  19. package/dist/templates/egg3-simple-ts/README.md +33 -0
  20. package/dist/templates/egg3-simple-ts/_.gitignore +20 -0
  21. package/dist/templates/egg3-simple-ts/app/controller/home.ts +8 -0
  22. package/dist/templates/egg3-simple-ts/app/router.ts +7 -0
  23. package/dist/templates/egg3-simple-ts/app/service/Test.ts +14 -0
  24. package/dist/templates/egg3-simple-ts/config/config.default.ts +23 -0
  25. package/dist/templates/egg3-simple-ts/config/config.local.ts +6 -0
  26. package/dist/templates/egg3-simple-ts/config/config.prod.ts +6 -0
  27. package/dist/templates/egg3-simple-ts/config/plugin.ts +11 -0
  28. package/dist/templates/egg3-simple-ts/package.json +45 -0
  29. package/dist/templates/egg3-simple-ts/test/app/controller/home.test.ts +9 -0
  30. package/dist/templates/egg3-simple-ts/test/app/service/Test.test.ts +16 -0
  31. package/dist/templates/egg3-simple-ts/tsconfig.json +4 -0
  32. package/dist/templates/egg3-simple-ts/typings/index.d.ts +3 -0
  33. package/dist/templates/egg3-tegg/.vscode/launch.json +26 -0
  34. package/dist/templates/egg3-tegg/README.md +33 -0
  35. package/dist/templates/egg3-tegg/_.gitignore +21 -0
  36. package/dist/templates/egg3-tegg/app/module/bar/controller/home.ts +24 -0
  37. package/dist/templates/egg3-tegg/app/module/bar/controller/user.ts +24 -0
  38. package/dist/templates/egg3-tegg/app/module/bar/package.json +6 -0
  39. package/dist/templates/egg3-tegg/app/module/foo/index.ts +1 -0
  40. package/dist/templates/egg3-tegg/app/module/foo/package.json +6 -0
  41. package/dist/templates/egg3-tegg/app/module/foo/service/HelloService.ts +19 -0
  42. package/dist/templates/egg3-tegg/config/config.default.ts +30 -0
  43. package/dist/templates/egg3-tegg/config/config.local.ts +6 -0
  44. package/dist/templates/egg3-tegg/config/config.prod.ts +6 -0
  45. package/dist/templates/egg3-tegg/config/config.unittest.ts +6 -0
  46. package/dist/templates/egg3-tegg/config/plugin.ts +34 -0
  47. package/dist/templates/egg3-tegg/package.json +58 -0
  48. package/dist/templates/egg3-tegg/test/app/module/bar/controller/home.test.ts +11 -0
  49. package/dist/templates/egg3-tegg/test/app/module/bar/controller/user.test.ts +14 -0
  50. package/dist/templates/egg3-tegg/test/app/module/foo/service/HelloService.test.ts +14 -0
  51. package/dist/templates/egg3-tegg/tsconfig.json +13 -0
  52. package/dist/templates/simple-ts/README.md +33 -0
  53. package/dist/templates/simple-ts/_.gitignore +20 -0
  54. package/dist/templates/simple-ts/app/controller/home.ts +8 -0
  55. package/dist/templates/simple-ts/app/router.ts +7 -0
  56. package/dist/templates/simple-ts/app/service/Test.ts +14 -0
  57. package/dist/templates/simple-ts/config/config.default.ts +23 -0
  58. package/dist/templates/simple-ts/config/config.local.ts +6 -0
  59. package/dist/templates/simple-ts/config/config.prod.ts +6 -0
  60. package/dist/templates/simple-ts/config/plugin.ts +11 -0
  61. package/dist/templates/simple-ts/package.json +51 -0
  62. package/dist/templates/simple-ts/test/app/controller/home.test.ts +8 -0
  63. package/dist/templates/simple-ts/test/app/service/Test.test.ts +9 -0
  64. package/dist/templates/simple-ts/tsconfig.json +10 -0
  65. package/dist/templates/simple-ts/typings/index.d.ts +3 -0
  66. package/dist/templates/tegg/.vscode/launch.json +26 -0
  67. package/dist/templates/tegg/README.md +33 -0
  68. package/dist/templates/tegg/_.gitignore +21 -0
  69. package/dist/templates/tegg/app/module/bar/controller/home.ts +24 -0
  70. package/dist/templates/tegg/app/module/bar/controller/user.ts +24 -0
  71. package/dist/templates/tegg/app/module/bar/package.json +6 -0
  72. package/dist/templates/tegg/app/module/foo/index.ts +1 -0
  73. package/dist/templates/tegg/app/module/foo/package.json +6 -0
  74. package/dist/templates/tegg/app/module/foo/service/HelloService.ts +19 -0
  75. package/dist/templates/tegg/config/config.default.ts +30 -0
  76. package/dist/templates/tegg/config/config.local.ts +6 -0
  77. package/dist/templates/tegg/config/config.prod.ts +6 -0
  78. package/dist/templates/tegg/config/config.unittest.ts +6 -0
  79. package/dist/templates/tegg/config/plugin.ts +34 -0
  80. package/dist/templates/tegg/package.json +58 -0
  81. package/dist/templates/tegg/test/app/module/bar/controller/home.test.ts +8 -0
  82. package/dist/templates/tegg/test/app/module/bar/controller/user.test.ts +11 -0
  83. package/dist/templates/tegg/test/app/module/foo/service/HelloService.test.ts +9 -0
  84. package/dist/templates/tegg/tsconfig.json +13 -0
  85. package/package.json +38 -29
  86. package/bin/create-egg.js +0 -3
@@ -0,0 +1,51 @@
1
+ {
2
+ "name": "{{name}}",
3
+ "description": "Hello Egg.js",
4
+ "type": "module",
5
+ "private": true,
6
+ "egg": {
7
+ "typescript": true
8
+ },
9
+ "scripts": {
10
+ "start": "eggctl start --daemon --title=egg-server-{{name}}",
11
+ "stop": "eggctl stop --title=egg-server-{{name}}",
12
+ "dev": "egg-bin dev",
13
+ "test:local": "vitest run",
14
+ "pretest": "npm run clean && npm run lint -- --fix",
15
+ "test": "vitest run",
16
+ "preci": "npm run clean && npm run lint",
17
+ "ci": "vitest run --coverage",
18
+ "postci": "npm run prepublishOnly && npm start && sleep 10 && npm stop && npm run clean",
19
+ "lint": "oxlint --type-aware",
20
+ "tsc": "tsc",
21
+ "clean": "tsc -b --clean",
22
+ "prepublishOnly": "npm run clean && npm run tsc"
23
+ },
24
+ "dependencies": {
25
+ "@eggjs/scripts": "^4.0.0",
26
+ "egg": "beta"
27
+ },
28
+ "devDependencies": {
29
+ "@eggjs/bin": "beta",
30
+ "@eggjs/mock": "beta",
31
+ "@eggjs/tsconfig": "beta",
32
+ "@types/node": "24",
33
+ "oxlint": "1",
34
+ "oxlint-tsgolint": "^0.2.0",
35
+ "typescript": "5",
36
+ "vitest": "beta"
37
+ },
38
+ "engines": {
39
+ "node": ">=20.19.0"
40
+ },
41
+ "homepage": "https://github.com/YOUR_USERNAME/YOUR_REPO#readme",
42
+ "bugs": {
43
+ "url": "https://github.com/YOUR_USERNAME/YOUR_REPO/issues"
44
+ },
45
+ "repository": {
46
+ "type": "git",
47
+ "url": "git+https://github.com/YOUR_USERNAME/YOUR_REPO.git"
48
+ },
49
+ "author": "Author Name <author.name@mail.com>",
50
+ "license": "MIT"
51
+ }
@@ -0,0 +1,8 @@
1
+ import { test, expect } from 'vitest';
2
+
3
+ import { app } from '@eggjs/mock/bootstrap';
4
+
5
+ test('should GET / status 200', async () => {
6
+ const res = await app.httpRequest().get('/').expect(200);
7
+ expect(res.text).toBe('hi, egg');
8
+ });
@@ -0,0 +1,9 @@
1
+ import { test, expect } from 'vitest';
2
+
3
+ import { app } from '@eggjs/mock/bootstrap';
4
+
5
+ test('sayHi should return hi, egg', async () => {
6
+ const ctx = app.mockContext();
7
+ const result = await ctx.service.test.sayHi('egg');
8
+ expect(result).toBe('hi, egg');
9
+ });
@@ -0,0 +1,10 @@
1
+ {
2
+ "extends": "@eggjs/tsconfig",
3
+ "compilerOptions": {
4
+ "target": "ES2022",
5
+ "module": "NodeNext",
6
+ "moduleResolution": "NodeNext",
7
+ "declaration": false,
8
+ "baseUrl": "."
9
+ }
10
+ }
@@ -0,0 +1,3 @@
1
+ import 'egg';
2
+
3
+ declare module 'egg' {}
@@ -0,0 +1,26 @@
1
+ {
2
+ // Use IntelliSense to learn about possible attributes.
3
+ // Hover to view descriptions of existing attributes.
4
+ // For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
5
+ "version": "0.2.0",
6
+ "configurations": [
7
+ {
8
+ "type": "node",
9
+ "request": "launch",
10
+ "name": "Egg Debug",
11
+ "runtimeExecutable": "npm",
12
+ "runtimeArgs": ["run", "dev", "--", "--inspect-brk"],
13
+ "console": "integratedTerminal",
14
+ "restart": true,
15
+ "autoAttachChildProcesses": true
16
+ },
17
+ {
18
+ "type": "node",
19
+ "request": "launch",
20
+ "name": "Egg Test",
21
+ "runtimeExecutable": "npm",
22
+ "runtimeArgs": ["run", "test:local", "--", "--inspect-brk"],
23
+ "autoAttachChildProcesses": true
24
+ }
25
+ ]
26
+ }
@@ -0,0 +1,33 @@
1
+ # tegg app
2
+
3
+ [Hacker News](https://news.ycombinator.com/) showcase using [tegg](https://github.com/eggjs/tegg)
4
+
5
+ ## QuickStart
6
+
7
+ ### Development
8
+
9
+ ```bash
10
+ npm i
11
+ npm run dev
12
+ open http://localhost:7001/
13
+ ```
14
+
15
+ Don't tsc compile at development mode, if you had run `tsc` then you need to `npm run clean` before `npm run dev`.
16
+
17
+ ### Deploy
18
+
19
+ ```bash
20
+ npm run tsc
21
+ npm start
22
+ ```
23
+
24
+ ### Npm Scripts
25
+
26
+ - Use `npm run lint` to check code style
27
+ - Use `npm test` to run unit test
28
+ - se `npm run clean` to clean compiled js at development mode once
29
+
30
+ ### Requirement
31
+
32
+ - Node.js >= 18.x
33
+ - Typescript >= 5.x
@@ -0,0 +1,21 @@
1
+ logs/
2
+ npm-debug.log
3
+ node_modules/
4
+ coverage/
5
+ .idea/
6
+ run/
7
+ logs/
8
+ .DS_Store
9
+ .vscode
10
+ *.swp
11
+ *.lock
12
+ *.js
13
+ .eslintcache
14
+
15
+ app/**/*.js
16
+ test/**/*.js
17
+ config/**/*.js
18
+ app/**/*.map
19
+ test/**/*.map
20
+ config/**/*.map
21
+ .package-lock.json
@@ -0,0 +1,24 @@
1
+ import { EggLogger } from 'egg';
2
+ import {
3
+ Inject,
4
+ HTTPController,
5
+ HTTPMethod,
6
+ HTTPMethodEnum,
7
+ } from '@eggjs/tegg';
8
+
9
+ @HTTPController({
10
+ path: '/',
11
+ })
12
+ export class HomeController {
13
+ @Inject()
14
+ private logger: EggLogger;
15
+
16
+ @HTTPMethod({
17
+ method: HTTPMethodEnum.GET,
18
+ path: '/',
19
+ })
20
+ async index() {
21
+ this.logger.info('hello egg logger');
22
+ return 'hello egg';
23
+ }
24
+ }
@@ -0,0 +1,24 @@
1
+ import {
2
+ Inject,
3
+ HTTPController,
4
+ HTTPMethod,
5
+ HTTPMethodEnum,
6
+ HTTPQuery,
7
+ } from '@eggjs/tegg';
8
+ import { HelloService } from '@/module/foo';
9
+
10
+ @HTTPController({
11
+ path: '/bar',
12
+ })
13
+ export class UserController {
14
+ @Inject()
15
+ private helloService: HelloService;
16
+
17
+ @HTTPMethod({
18
+ method: HTTPMethodEnum.GET,
19
+ path: 'user',
20
+ })
21
+ async user(@HTTPQuery({ name: 'userId' }) userId: string) {
22
+ return await this.helloService.hello(userId);
23
+ }
24
+ }
@@ -0,0 +1,6 @@
1
+ {
2
+ "name": "bar",
3
+ "eggModule": {
4
+ "name": "bar"
5
+ }
6
+ }
@@ -0,0 +1 @@
1
+ export { HelloService } from './service/HelloService.ts';
@@ -0,0 +1,6 @@
1
+ {
2
+ "name": "foo",
3
+ "eggModule": {
4
+ "name": "foo"
5
+ }
6
+ }
@@ -0,0 +1,19 @@
1
+ import { EggLogger } from 'egg';
2
+ import { SingletonProto, AccessLevel, Inject } from '@eggjs/tegg';
3
+
4
+ @SingletonProto({
5
+ // 如果需要在上层使用,需要把 accessLevel 显示声明为 public
6
+ accessLevel: AccessLevel.PUBLIC,
7
+ })
8
+ export class HelloService {
9
+ // 注入一个 logger
10
+ @Inject()
11
+ private logger: EggLogger;
12
+
13
+ // 封装业务
14
+ async hello(userId: string): Promise<string> {
15
+ const result = { userId, handledBy: 'foo module' };
16
+ this.logger.info('[hello] get result: %j', result);
17
+ return `hello, ${result.userId}`;
18
+ }
19
+ }
@@ -0,0 +1,30 @@
1
+ import { EggAppConfig, EggAppInfo, PowerPartial } from 'egg';
2
+
3
+ export default (appInfo: EggAppInfo) => {
4
+ const config = {} as PowerPartial<EggAppConfig>;
5
+
6
+ // override config from framework / plugin
7
+ // use for cookie sign key, should change to your own and keep security
8
+ config.keys = appInfo.name + '_{{keys}}';
9
+
10
+ // add your egg config in here
11
+ config.middleware = [];
12
+
13
+ // change multipart mode to file
14
+ // @see https://github.com/eggjs/multipart/blob/master/src/config/config.default.ts#L104
15
+ config.multipart = {
16
+ mode: 'file',
17
+ };
18
+
19
+ // add your special config in here
20
+ // Usage: `app.config.bizConfig.sourceUrl`
21
+ const bizConfig = {
22
+ sourceUrl: `https://github.com/eggjs/examples/tree/master/${appInfo.name}`,
23
+ };
24
+
25
+ // the return config will combines to EggAppConfig
26
+ return {
27
+ ...config,
28
+ bizConfig,
29
+ };
30
+ };
@@ -0,0 +1,6 @@
1
+ import { EggAppConfig, PowerPartial } from 'egg';
2
+
3
+ export default () => {
4
+ const config = {} as PowerPartial<EggAppConfig>;
5
+ return config;
6
+ };
@@ -0,0 +1,6 @@
1
+ import { EggAppConfig, PowerPartial } from 'egg';
2
+
3
+ export default () => {
4
+ const config = {} as PowerPartial<EggAppConfig>;
5
+ return config;
6
+ };
@@ -0,0 +1,6 @@
1
+ import { EggAppConfig, PowerPartial } from 'egg';
2
+
3
+ export default () => {
4
+ const config = {} as PowerPartial<EggAppConfig>;
5
+ return config;
6
+ };
@@ -0,0 +1,34 @@
1
+ import { EggPlugin } from 'egg';
2
+
3
+ const plugin: EggPlugin = {
4
+ tegg: {
5
+ enable: true,
6
+ package: '@eggjs/tegg-plugin',
7
+ },
8
+ teggConfig: {
9
+ enable: true,
10
+ package: '@eggjs/tegg-config',
11
+ },
12
+ teggController: {
13
+ enable: true,
14
+ package: '@eggjs/tegg-controller-plugin',
15
+ },
16
+ teggSchedule: {
17
+ enable: true,
18
+ package: '@eggjs/tegg-schedule-plugin',
19
+ },
20
+ eventbusModule: {
21
+ enable: true,
22
+ package: '@eggjs/tegg-eventbus-plugin',
23
+ },
24
+ aopModule: {
25
+ enable: true,
26
+ package: '@eggjs/tegg-aop-plugin',
27
+ },
28
+ tracer: {
29
+ enable: true,
30
+ package: '@eggjs/tracer',
31
+ },
32
+ };
33
+
34
+ export default plugin;
@@ -0,0 +1,58 @@
1
+ {
2
+ "name": "{{name}}",
3
+ "description": "Hello Egg.js",
4
+ "private": true,
5
+ "egg": {
6
+ "typescript": true
7
+ },
8
+ "scripts": {
9
+ "start": "eggctl start --daemon --title=egg-server-{{name}}",
10
+ "stop": "eggctl stop --title=egg-server-{{name}}",
11
+ "dev": "egg-bin dev",
12
+ "test:local": "vitest run",
13
+ "pretest": "npm run clean && npm run lint -- --fix",
14
+ "test": "vitest run",
15
+ "preci": "npm run clean && npm run lint",
16
+ "ci": "vitest run --coverage",
17
+ "postci": "npm run prepublishOnly && npm start && sleep 10 && npm stop && npm run clean",
18
+ "lint": "oxlint --type-aware",
19
+ "tsc": "tsc",
20
+ "clean": "tsc -b --clean",
21
+ "prepublishOnly": "npm run clean && npm run tsc"
22
+ },
23
+ "dependencies": {
24
+ "@eggjs/scripts": "^4.0.0",
25
+ "@eggjs/tegg": "^3.5.2",
26
+ "@eggjs/tegg-aop-plugin": "^3.5.2",
27
+ "@eggjs/tegg-config": "^3.5.2",
28
+ "@eggjs/tegg-controller-plugin": "^3.5.2",
29
+ "@eggjs/tegg-eventbus-plugin": "^3.5.2",
30
+ "@eggjs/tegg-plugin": "^3.5.2",
31
+ "@eggjs/tegg-schedule-plugin": "^3.5.2",
32
+ "@eggjs/tracer": "^3.0.0",
33
+ "egg": "beta"
34
+ },
35
+ "devDependencies": {
36
+ "@eggjs/bin": "beta",
37
+ "@eggjs/mock": "beta",
38
+ "@eggjs/tsconfig": "beta",
39
+ "@types/node": "24",
40
+ "oxlint": "1",
41
+ "oxlint-tsgolint": "^0.2.0",
42
+ "typescript": "5",
43
+ "vitest": "beta"
44
+ },
45
+ "engines": {
46
+ "node": ">=20.19.0"
47
+ },
48
+ "homepage": "https://github.com/YOUR_USERNAME/YOUR_REPO#readme",
49
+ "bugs": {
50
+ "url": "https://github.com/YOUR_USERNAME/YOUR_REPO/issues"
51
+ },
52
+ "repository": {
53
+ "type": "git",
54
+ "url": "git+https://github.com/YOUR_USERNAME/YOUR_REPO.git"
55
+ },
56
+ "author": "Author Name <author.name@mail.com>",
57
+ "license": "MIT"
58
+ }
@@ -0,0 +1,8 @@
1
+ import { test, expect } from 'vitest';
2
+ import { app } from '@eggjs/mock/bootstrap';
3
+
4
+ test('should GET / status 200', async () => {
5
+ const res = await app.httpRequest().get('/');
6
+ expect(res.status).toBe(200);
7
+ expect(res.text).toBe('hello egg');
8
+ });
@@ -0,0 +1,11 @@
1
+ import { test, expect } from 'vitest';
2
+ import { app } from '@eggjs/mock/bootstrap';
3
+
4
+ test('should GET /bar/user status 200', async () => {
5
+ const res = await app
6
+ .httpRequest()
7
+ .get('/bar/user')
8
+ .query({ userId: '20170901' });
9
+ expect(res.status).toBe(200);
10
+ expect(res.text).toBe('hello, 20170901');
11
+ });
@@ -0,0 +1,9 @@
1
+ import { test, expect } from 'vitest';
2
+ import { app } from '@eggjs/mock/bootstrap';
3
+ import { HelloService } from '@/module/foo/service/HelloService';
4
+
5
+ test('should hello() work', async () => {
6
+ const helloService = await app.getEggObject(HelloService);
7
+ const msg = await helloService.hello('123456');
8
+ expect(msg).toBe('hello, 123456');
9
+ });
@@ -0,0 +1,13 @@
1
+ {
2
+ "extends": "@eggjs/tsconfig",
3
+ "compilerOptions": {
4
+ "target": "ES2022",
5
+ "module": "NodeNext",
6
+ "moduleResolution": "NodeNext",
7
+ "declaration": false,
8
+ "paths": {
9
+ "@/module/*": ["app/module/*"]
10
+ },
11
+ "baseUrl": "."
12
+ }
13
+ }
package/package.json CHANGED
@@ -1,44 +1,53 @@
1
1
  {
2
2
  "name": "create-egg",
3
- "version": "3.0.0",
4
- "description": "Alias for egg-init, so you could use `npm init egg showcase`.",
5
- "dependencies": {
6
- "egg-init": "3"
3
+ "version": "4.0.1-beta.0",
4
+ "publishConfig": {
5
+ "access": "public"
7
6
  },
7
+ "description": "Scaffolding Your First Egg.js Project",
8
+ "type": "module",
8
9
  "devDependencies": {
9
- "coffee": "^5.1.0",
10
- "egg-bin": "6",
11
- "eslint": "8",
12
- "eslint-config-egg": "13",
13
- "git-contributor": "^2.1.5"
10
+ "@types/cross-spawn": "^6.0.6",
11
+ "@types/node": "24.5.2",
12
+ "execa": "^9.6.0",
13
+ "tsdown": "0.15.3"
14
14
  },
15
- "bin": "./bin/create-egg.js",
16
15
  "engines": {
17
- "node": ">=16.0.0"
16
+ "node": ">=20.19.0"
18
17
  },
19
- "scripts": {
20
- "lint": "eslint .",
21
- "test": "npm run lint -- --fix && npm run test-local",
22
- "test-local": "egg-bin test",
23
- "cov": "egg-bin cov",
24
- "ci": "npm run lint && npm run cov",
25
- "contributor": "git-contributor"
26
- },
27
- "eslintIgnore": [
28
- "coverage",
29
- "dist"
30
- ],
31
18
  "repository": {
32
19
  "type": "git",
33
- "url": "git@github.com:eggjs/create-egg.git"
20
+ "url": "git@github.com:eggjs/egg.git",
21
+ "directory": "tools/create-egg"
34
22
  },
35
- "bug": {
23
+ "bugs": {
36
24
  "url": "https://github.com/eggjs/egg/issues"
37
25
  },
38
- "homepage": "https://github.com/eggjs/create-egg",
26
+ "homepage": "https://github.com/eggjs/egg/tree/next/tools/create-egg",
39
27
  "files": [
40
- "bin"
28
+ "dist"
41
29
  ],
42
30
  "author": "TZ <atian25@qq.com>",
43
- "license": "MIT"
44
- }
31
+ "license": "MIT",
32
+ "main": "./dist/index.js",
33
+ "module": "./dist/index.js",
34
+ "types": "./dist/index.d.ts",
35
+ "exports": {
36
+ ".": "./dist/index.js",
37
+ "./cli": "./dist/cli.js",
38
+ "./package.json": "./package.json"
39
+ },
40
+ "bin": {
41
+ "create-egg": "./dist/cli.js"
42
+ },
43
+ "dependencies": {
44
+ "@clack/prompts": "^0.11.0",
45
+ "cross-spawn": "^7.0.6",
46
+ "mri": "^1.2.0",
47
+ "picocolors": "^1.1.1"
48
+ },
49
+ "scripts": {
50
+ "test": "vitest run",
51
+ "build": "tsdown"
52
+ }
53
+ }
package/bin/create-egg.js DELETED
@@ -1,3 +0,0 @@
1
- #!/usr/bin/env node
2
-
3
- require('egg-init/bin/egg-init');