feng3d-cli 0.0.3 → 0.0.5

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 (54) hide show
  1. package/README.md +0 -17
  2. package/bin/cli.js +135 -0
  3. package/dist/index.js +792 -9
  4. package/dist/index.js.map +1 -1
  5. package/dist/index.umd.cjs +792 -0
  6. package/dist/index.umd.cjs.map +1 -0
  7. package/{dist → lib}/commands/create.d.ts.map +1 -1
  8. package/{dist → lib}/commands/update.d.ts +1 -0
  9. package/{dist → lib}/commands/update.d.ts.map +1 -1
  10. package/{dist → lib}/index.d.ts +2 -1
  11. package/lib/index.d.ts.map +1 -0
  12. package/{dist → lib}/templates.d.ts +10 -14
  13. package/lib/templates.d.ts.map +1 -0
  14. package/{dist → lib}/types/config.d.ts +2 -0
  15. package/{dist → lib}/types/config.d.ts.map +1 -1
  16. package/package.json +20 -22
  17. package/schemas/feng3d.schema.json +5 -0
  18. package/templates/.github/workflows/pages.yml +35 -2
  19. package/templates/.github/workflows/publish.yml +2 -8
  20. package/templates/.github/workflows/pull-request.yml +7 -2
  21. package/templates/feng3d.json +2 -1
  22. package/templates/gitignore +3 -0
  23. package/templates/scripts/postpublish.js +19 -0
  24. package/templates/scripts/prepublish.js +19 -0
  25. package/templates/typedoc.json +2 -2
  26. package/templates/vite.config.js +49 -0
  27. package/dist/cli.d.ts +0 -7
  28. package/dist/cli.d.ts.map +0 -1
  29. package/dist/cli.js +0 -108
  30. package/dist/cli.js.map +0 -1
  31. package/dist/commands/create.js +0 -125
  32. package/dist/commands/create.js.map +0 -1
  33. package/dist/commands/oss.js +0 -132
  34. package/dist/commands/oss.js.map +0 -1
  35. package/dist/commands/update.js +0 -482
  36. package/dist/commands/update.js.map +0 -1
  37. package/dist/eslint.d.ts +0 -236
  38. package/dist/eslint.d.ts.map +0 -1
  39. package/dist/eslint.js +0 -119
  40. package/dist/eslint.js.map +0 -1
  41. package/dist/index.d.ts.map +0 -1
  42. package/dist/templates.d.ts.map +0 -1
  43. package/dist/templates.js +0 -153
  44. package/dist/templates.js.map +0 -1
  45. package/dist/types/config.js +0 -50
  46. package/dist/types/config.js.map +0 -1
  47. package/dist/versions.js +0 -60
  48. package/dist/versions.js.map +0 -1
  49. package/templates/vitest.config.ts +0 -8
  50. /package/{dist → lib}/commands/create.d.ts +0 -0
  51. /package/{dist → lib}/commands/oss.d.ts +0 -0
  52. /package/{dist → lib}/commands/oss.d.ts.map +0 -0
  53. /package/{dist → lib}/versions.d.ts +0 -0
  54. /package/{dist → lib}/versions.d.ts.map +0 -0
package/dist/eslint.d.ts DELETED
@@ -1,236 +0,0 @@
1
- /**
2
- * feng3d ESLint 配置
3
- */
4
- type ESLintConfig = any;
5
- /**
6
- * 创建 ESLint 配置
7
- * @param options 配置选项
8
- */
9
- export declare function createEslintConfig(options?: {
10
- /** 额外需要忽略的目录 */
11
- ignores?: string[];
12
- /** 额外的规则 */
13
- rules?: Record<string, unknown>;
14
- }): ESLintConfig[];
15
- /**
16
- * 默认 ESLint 规则配置
17
- */
18
- export declare const eslintRules: {
19
- readonly '@typescript-eslint/no-unused-vars': "off";
20
- readonly '@typescript-eslint/no-explicit-any': "off";
21
- readonly 'no-prototype-builtins': "off";
22
- readonly '@typescript-eslint/ban-ts-comment': "off";
23
- readonly '@typescript-eslint/no-unused-expressions': "off";
24
- readonly '@typescript-eslint/no-empty-object-type': "off";
25
- readonly '@typescript-eslint/no-unsafe-declaration-merging': "off";
26
- readonly '@typescript-eslint/no-unsafe-function-type': "off";
27
- readonly '@typescript-eslint/no-this-alias': "off";
28
- readonly 'prefer-const': "off";
29
- readonly 'no-fallthrough': "off";
30
- readonly 'no-constant-binary-expression': "off";
31
- readonly 'spaced-comment': readonly ["warn", "always", {
32
- readonly line: {
33
- readonly markers: readonly ["/"];
34
- readonly exceptions: readonly ["-", "+"];
35
- };
36
- readonly block: {
37
- readonly markers: readonly ["!"];
38
- readonly exceptions: readonly ["*"];
39
- readonly balanced: true;
40
- };
41
- }];
42
- readonly 'no-trailing-spaces': readonly ["warn", {
43
- readonly skipBlankLines: false;
44
- readonly ignoreComments: false;
45
- }];
46
- readonly 'no-multiple-empty-lines': readonly ["warn", {
47
- readonly max: 1;
48
- readonly maxEOF: 1;
49
- readonly maxBOF: 0;
50
- }];
51
- readonly 'lines-between-class-members': readonly ["warn", "always", {
52
- readonly exceptAfterSingleLine: true;
53
- }];
54
- readonly 'padding-line-between-statements': readonly ["warn", {
55
- readonly blankLine: "always";
56
- readonly prev: "*";
57
- readonly next: "return";
58
- }, {
59
- readonly blankLine: "any";
60
- readonly prev: readonly ["const", "let", "var"];
61
- readonly next: readonly ["const", "let", "var"];
62
- }];
63
- readonly indent: readonly ["warn", 4, {
64
- readonly SwitchCase: 1;
65
- readonly VariableDeclarator: "first";
66
- readonly outerIIFEBody: 1;
67
- readonly MemberExpression: 1;
68
- readonly FunctionDeclaration: {
69
- readonly parameters: 1;
70
- readonly body: 1;
71
- };
72
- readonly FunctionExpression: {
73
- readonly parameters: 1;
74
- readonly body: 1;
75
- };
76
- readonly CallExpression: {
77
- readonly arguments: 1;
78
- };
79
- readonly ArrayExpression: 1;
80
- readonly ObjectExpression: 1;
81
- readonly ImportDeclaration: 1;
82
- readonly flatTernaryExpressions: false;
83
- readonly ignoreComments: false;
84
- }];
85
- readonly quotes: readonly ["warn", "single", {
86
- readonly avoidEscape: true;
87
- readonly allowTemplateLiterals: true;
88
- }];
89
- readonly semi: readonly ["off"];
90
- readonly 'comma-dangle': readonly ["warn", "always-multiline"];
91
- readonly 'object-curly-spacing': readonly ["warn", "always"];
92
- readonly 'array-bracket-spacing': readonly ["warn", "never"];
93
- readonly 'arrow-spacing': readonly ["warn", {
94
- readonly before: true;
95
- readonly after: true;
96
- }];
97
- readonly 'block-spacing': readonly ["warn", "always"];
98
- readonly 'comma-spacing': readonly ["warn", {
99
- readonly before: false;
100
- readonly after: true;
101
- }];
102
- readonly 'comma-style': readonly ["warn", "last"];
103
- readonly 'key-spacing': readonly ["warn", {
104
- readonly beforeColon: false;
105
- readonly afterColon: true;
106
- }];
107
- readonly 'keyword-spacing': readonly ["warn", {
108
- readonly before: true;
109
- readonly after: true;
110
- }];
111
- readonly 'space-before-blocks': readonly ["warn", "always"];
112
- readonly 'space-before-function-paren': readonly ["warn", {
113
- readonly anonymous: "always";
114
- readonly named: "never";
115
- readonly asyncArrow: "always";
116
- }];
117
- readonly 'space-in-parens': readonly ["warn", "never"];
118
- readonly 'space-infix-ops': readonly ["warn"];
119
- readonly 'space-unary-ops': readonly ["warn", {
120
- readonly words: true;
121
- readonly nonwords: false;
122
- }];
123
- };
124
- /**
125
- * 预构建的 ESLint 配置(用于直接导出使用)
126
- */
127
- export declare const eslintConfig: {
128
- rules: {
129
- readonly '@typescript-eslint/no-unused-vars': "off";
130
- readonly '@typescript-eslint/no-explicit-any': "off";
131
- readonly 'no-prototype-builtins': "off";
132
- readonly '@typescript-eslint/ban-ts-comment': "off";
133
- readonly '@typescript-eslint/no-unused-expressions': "off";
134
- readonly '@typescript-eslint/no-empty-object-type': "off";
135
- readonly '@typescript-eslint/no-unsafe-declaration-merging': "off";
136
- readonly '@typescript-eslint/no-unsafe-function-type': "off";
137
- readonly '@typescript-eslint/no-this-alias': "off";
138
- readonly 'prefer-const': "off";
139
- readonly 'no-fallthrough': "off";
140
- readonly 'no-constant-binary-expression': "off";
141
- readonly 'spaced-comment': readonly ["warn", "always", {
142
- readonly line: {
143
- readonly markers: readonly ["/"];
144
- readonly exceptions: readonly ["-", "+"];
145
- };
146
- readonly block: {
147
- readonly markers: readonly ["!"];
148
- readonly exceptions: readonly ["*"];
149
- readonly balanced: true;
150
- };
151
- }];
152
- readonly 'no-trailing-spaces': readonly ["warn", {
153
- readonly skipBlankLines: false;
154
- readonly ignoreComments: false;
155
- }];
156
- readonly 'no-multiple-empty-lines': readonly ["warn", {
157
- readonly max: 1;
158
- readonly maxEOF: 1;
159
- readonly maxBOF: 0;
160
- }];
161
- readonly 'lines-between-class-members': readonly ["warn", "always", {
162
- readonly exceptAfterSingleLine: true;
163
- }];
164
- readonly 'padding-line-between-statements': readonly ["warn", {
165
- readonly blankLine: "always";
166
- readonly prev: "*";
167
- readonly next: "return";
168
- }, {
169
- readonly blankLine: "any";
170
- readonly prev: readonly ["const", "let", "var"];
171
- readonly next: readonly ["const", "let", "var"];
172
- }];
173
- readonly indent: readonly ["warn", 4, {
174
- readonly SwitchCase: 1;
175
- readonly VariableDeclarator: "first";
176
- readonly outerIIFEBody: 1;
177
- readonly MemberExpression: 1;
178
- readonly FunctionDeclaration: {
179
- readonly parameters: 1;
180
- readonly body: 1;
181
- };
182
- readonly FunctionExpression: {
183
- readonly parameters: 1;
184
- readonly body: 1;
185
- };
186
- readonly CallExpression: {
187
- readonly arguments: 1;
188
- };
189
- readonly ArrayExpression: 1;
190
- readonly ObjectExpression: 1;
191
- readonly ImportDeclaration: 1;
192
- readonly flatTernaryExpressions: false;
193
- readonly ignoreComments: false;
194
- }];
195
- readonly quotes: readonly ["warn", "single", {
196
- readonly avoidEscape: true;
197
- readonly allowTemplateLiterals: true;
198
- }];
199
- readonly semi: readonly ["off"];
200
- readonly 'comma-dangle': readonly ["warn", "always-multiline"];
201
- readonly 'object-curly-spacing': readonly ["warn", "always"];
202
- readonly 'array-bracket-spacing': readonly ["warn", "never"];
203
- readonly 'arrow-spacing': readonly ["warn", {
204
- readonly before: true;
205
- readonly after: true;
206
- }];
207
- readonly 'block-spacing': readonly ["warn", "always"];
208
- readonly 'comma-spacing': readonly ["warn", {
209
- readonly before: false;
210
- readonly after: true;
211
- }];
212
- readonly 'comma-style': readonly ["warn", "last"];
213
- readonly 'key-spacing': readonly ["warn", {
214
- readonly beforeColon: false;
215
- readonly afterColon: true;
216
- }];
217
- readonly 'keyword-spacing': readonly ["warn", {
218
- readonly before: true;
219
- readonly after: true;
220
- }];
221
- readonly 'space-before-blocks': readonly ["warn", "always"];
222
- readonly 'space-before-function-paren': readonly ["warn", {
223
- readonly anonymous: "always";
224
- readonly named: "never";
225
- readonly asyncArrow: "always";
226
- }];
227
- readonly 'space-in-parens': readonly ["warn", "never"];
228
- readonly 'space-infix-ops': readonly ["warn"];
229
- readonly 'space-unary-ops': readonly ["warn", {
230
- readonly words: true;
231
- readonly nonwords: false;
232
- }];
233
- };
234
- };
235
- export {};
236
- //# sourceMappingURL=eslint.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"eslint.d.ts","sourceRoot":"","sources":["../src/eslint.ts"],"names":[],"mappings":"AAAA;;GAEG;AAGH,KAAK,YAAY,GAAG,GAAG,CAAC;AAExB;;;GAGG;AACH,wBAAgB,kBAAkB,CAAC,OAAO,GAAE;IACxC,gBAAgB;IAChB,OAAO,CAAC,EAAE,MAAM,EAAE,CAAC;IACnB,YAAY;IACZ,KAAK,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;CAC9B,GAAG,YAAY,EAAE,CAkBtB;AAED;;GAEG;AACH,eAAO,MAAM,WAAW;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAwFd,CAAC;AAEX;;GAEG;AACH,eAAO,MAAM,YAAY;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAExB,CAAC"}
package/dist/eslint.js DELETED
@@ -1,119 +0,0 @@
1
- /**
2
- * feng3d ESLint 配置
3
- */
4
- /**
5
- * 创建 ESLint 配置
6
- * @param options 配置选项
7
- */
8
- export function createEslintConfig(options = {}) {
9
- // 这个函数在运行时需要导入 eslint 相关模块
10
- // 返回配置数组
11
- return [
12
- // 忽略检查的文件和目录
13
- {
14
- ignores: [
15
- '**/node_modules/**',
16
- '**/dist/**',
17
- '**/lib/**',
18
- '**/public/**',
19
- '**/coverage/**',
20
- '**/.git/**',
21
- ...(options.ignores || []),
22
- ],
23
- },
24
- ];
25
- }
26
- /**
27
- * 默认 ESLint 规则配置
28
- */
29
- export const eslintRules = {
30
- '@typescript-eslint/no-unused-vars': 'off',
31
- '@typescript-eslint/no-explicit-any': 'off',
32
- 'no-prototype-builtins': 'off',
33
- '@typescript-eslint/ban-ts-comment': 'off',
34
- '@typescript-eslint/no-unused-expressions': 'off',
35
- '@typescript-eslint/no-empty-object-type': 'off',
36
- '@typescript-eslint/no-unsafe-declaration-merging': 'off',
37
- '@typescript-eslint/no-unsafe-function-type': 'off',
38
- '@typescript-eslint/no-this-alias': 'off',
39
- 'prefer-const': 'off',
40
- 'no-fallthrough': 'off',
41
- 'no-constant-binary-expression': 'off',
42
- // 注释格式规则
43
- 'spaced-comment': ['warn', 'always', {
44
- line: {
45
- markers: ['/'],
46
- exceptions: ['-', '+'],
47
- },
48
- block: {
49
- markers: ['!'],
50
- exceptions: ['*'],
51
- balanced: true,
52
- },
53
- }],
54
- // 空格和换行规则
55
- 'no-trailing-spaces': ['warn', {
56
- skipBlankLines: false,
57
- ignoreComments: false,
58
- }],
59
- 'no-multiple-empty-lines': ['warn', {
60
- max: 1,
61
- maxEOF: 1,
62
- maxBOF: 0,
63
- }],
64
- 'lines-between-class-members': ['warn', 'always', {
65
- exceptAfterSingleLine: true,
66
- }],
67
- 'padding-line-between-statements': [
68
- 'warn',
69
- { blankLine: 'always', prev: '*', next: 'return' },
70
- { blankLine: 'any', prev: ['const', 'let', 'var'], next: ['const', 'let', 'var'] },
71
- ],
72
- // 缩进规则 - 使用 4 空格
73
- indent: ['warn', 4, {
74
- SwitchCase: 1,
75
- VariableDeclarator: 'first',
76
- outerIIFEBody: 1,
77
- MemberExpression: 1,
78
- FunctionDeclaration: { parameters: 1, body: 1 },
79
- FunctionExpression: { parameters: 1, body: 1 },
80
- CallExpression: { arguments: 1 },
81
- ArrayExpression: 1,
82
- ObjectExpression: 1,
83
- ImportDeclaration: 1,
84
- flatTernaryExpressions: false,
85
- ignoreComments: false,
86
- }],
87
- // 引号规则 - 使用单引号
88
- quotes: ['warn', 'single', {
89
- avoidEscape: true,
90
- allowTemplateLiterals: true,
91
- }],
92
- // 其他格式规则
93
- semi: ['off'],
94
- 'comma-dangle': ['warn', 'always-multiline'],
95
- 'object-curly-spacing': ['warn', 'always'],
96
- 'array-bracket-spacing': ['warn', 'never'],
97
- 'arrow-spacing': ['warn', { before: true, after: true }],
98
- 'block-spacing': ['warn', 'always'],
99
- 'comma-spacing': ['warn', { before: false, after: true }],
100
- 'comma-style': ['warn', 'last'],
101
- 'key-spacing': ['warn', { beforeColon: false, afterColon: true }],
102
- 'keyword-spacing': ['warn', { before: true, after: true }],
103
- 'space-before-blocks': ['warn', 'always'],
104
- 'space-before-function-paren': ['warn', {
105
- anonymous: 'always',
106
- named: 'never',
107
- asyncArrow: 'always',
108
- }],
109
- 'space-in-parens': ['warn', 'never'],
110
- 'space-infix-ops': ['warn'],
111
- 'space-unary-ops': ['warn', { words: true, nonwords: false }],
112
- };
113
- /**
114
- * 预构建的 ESLint 配置(用于直接导出使用)
115
- */
116
- export const eslintConfig = {
117
- rules: eslintRules,
118
- };
119
- //# sourceMappingURL=eslint.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"eslint.js","sourceRoot":"","sources":["../src/eslint.ts"],"names":[],"mappings":"AAAA;;GAEG;AAKH;;;GAGG;AACH,MAAM,UAAU,kBAAkB,CAAC,UAK/B,EAAE;IAEF,2BAA2B;IAC3B,SAAS;IACT,OAAO;QACH,aAAa;QACb;YACI,OAAO,EAAE;gBACL,oBAAoB;gBACpB,YAAY;gBACZ,WAAW;gBACX,cAAc;gBACd,gBAAgB;gBAChB,YAAY;gBACZ,GAAG,CAAC,OAAO,CAAC,OAAO,IAAI,EAAE,CAAC;aAC7B;SACJ;KACJ,CAAC;AACN,CAAC;AAED;;GAEG;AACH,MAAM,CAAC,MAAM,WAAW,GAAG;IACvB,mCAAmC,EAAE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AAE,MAAM,EAAE,IAAI,EAAE,KAAK,EAAE,IAAI,EAAE,CAAC;IAC1D,qBAAqB,EAAE,CAAC,MAAM,EAAE,QAAQ,CAAC;IACzC,6BAA6B,EAAE,CAAC,MAAM,EAAE;YACpC,SAAS,EAAE,QAAQ;YACnB,KAAK,EAAE,OAAO;YACd,UAAU,EAAE,QAAQ;SACvB,CAAC;IACF,iBAAiB,EAAE,CAAC,MAAM,EAAE,OAAO,CAAC;IACpC,iBAAiB,EAAE,CAAC,MAAM,CAAC;IAC3B,iBAAiB,EAAE,CAAC,MAAM,EAAE,EAAE,KAAK,EAAE,IAAI,EAAE,QAAQ,EAAE,KAAK,EAAE,CAAC;CACvD,CAAC;AAEX;;GAEG;AACH,MAAM,CAAC,MAAM,YAAY,GAAG;IACxB,KAAK,EAAE,WAAW;CACrB,CAAC"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAE,YAAY,EAAE,kBAAkB,EAAE,MAAM,aAAa,CAAC;AAC/D,OAAO,EAAE,QAAQ,EAAE,kBAAkB,EAAE,MAAM,eAAe,CAAC;AAC7D,cAAc,gBAAgB,CAAC;AAC/B,cAAc,mBAAmB,CAAC;AAClC,OAAO,EAAE,YAAY,EAAE,MAAM,mBAAmB,CAAC"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"templates.d.ts","sourceRoot":"","sources":["../src/templates.ts"],"names":[],"mappings":"AAAA;;GAEG;AAYH;;GAEG;AACH,wBAAgB,oBAAoB,IAAI,MAAM,CAI7C;AAED;;GAEG;AACH,wBAAgB,uBAAuB,IAAI,MAAM,CAGhD;AAED;;GAEG;AACH,wBAAgB,mBAAmB,IAAI,MAAM,CAG5C;AAED;;GAEG;AACH,wBAAgB,yBAAyB,IAAI,MAAM,CAGlD;AAED;;GAEG;AACH,wBAAgB,uBAAuB,IAAI,MAAM,CAGhD;AAED;;GAEG;AACH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CAAC;AAC9D,4CAA4C;AAC5C,eAAO,MAAM,mBAAmB,yBAAmB,CAAC"}
package/dist/templates.js DELETED
@@ -1,153 +0,0 @@
1
- /**
2
- * 项目模板文件内容
3
- */
4
- import fs from 'fs-extra';
5
- import path from 'path';
6
- import { fileURLToPath } from 'url';
7
- /**
8
- * 模板目录路径
9
- */
10
- const __dirname = path.dirname(fileURLToPath(import.meta.url));
11
- const TEMPLATES_DIR = path.resolve(__dirname, '../templates');
12
- /**
13
- * 获取 .gitignore 模板内容
14
- */
15
- export function getGitignoreTemplate() {
16
- // 模板文件命名为 gitignore(不带点),避免对 templates 目录生效
17
- return fs.readFileSync(path.join(TEMPLATES_DIR, 'gitignore'), 'utf-8');
18
- }
19
- /**
20
- * 获取 .cursorrules 模板内容
21
- */
22
- export function getCursorrrulesTemplate() {
23
- return fs.readFileSync(path.join(TEMPLATES_DIR, '.cursorrules'), 'utf-8');
24
- }
25
- /**
26
- * 获取 tsconfig.json 模板内容(对象形式)
27
- */
28
- export function getTsconfigTemplate() {
29
- return fs.readJsonSync(path.join(TEMPLATES_DIR, 'tsconfig.json'));
30
- }
31
- /**
32
- * 获取 tsconfig.json 模板内容(字符串形式)
33
- */
34
- export function getTsconfigTemplateString() {
35
- return fs.readFileSync(path.join(TEMPLATES_DIR, 'tsconfig.json'), 'utf-8');
36
- }
37
- /**
38
- * 获取 vitest.config.ts 模板内容
39
- */
40
- export function getVitestConfigTemplate() {
41
- return fs.readFileSync(path.join(TEMPLATES_DIR, 'vitest.config.ts'), 'utf-8');
42
- }
43
- /**
44
- * 获取 eslint.config.js 模板内容
45
- */
46
- export function getEslintConfigTemplate() {
47
- return fs.readFileSync(path.join(TEMPLATES_DIR, 'eslint.config.js'), 'utf-8');
48
- }
49
- /**
50
- * 获取 typedoc.json 模板内容(返回对象)
51
- */
52
- export function getTypedocConfig(options) {
53
- return JSON.parse(getTypedocConfigTemplate(options));
54
- }
55
- /**
56
- * 获取 typedoc.json 模板内容(返回字符串)
57
- */
58
- export function getTypedocConfigTemplate(options) {
59
- const templateContent = fs.readFileSync(path.join(TEMPLATES_DIR, 'typedoc.json'), 'utf-8');
60
- return templateContent
61
- .replace(/\{\{name\}\}/g, options.name)
62
- .replace(/\{\{repoName\}\}/g, options.repoName);
63
- }
64
- /**
65
- * 获取 test/_.test.ts 模板内容(空文件占位)
66
- */
67
- export function getTestIndexTemplate(_options) {
68
- return fs.readFileSync(path.join(TEMPLATES_DIR, 'test/_.test.ts'), 'utf-8');
69
- }
70
- /**
71
- * 获取 GitHub Actions publish workflow 模板内容
72
- */
73
- export function getPublishWorkflowTemplate() {
74
- return fs.readFileSync(path.join(TEMPLATES_DIR, '.github/workflows/publish.yml'), 'utf-8');
75
- }
76
- /**
77
- * 获取 GitHub Actions pages workflow 模板内容
78
- */
79
- export function getPagesWorkflowTemplate() {
80
- return fs.readFileSync(path.join(TEMPLATES_DIR, '.github/workflows/pages.yml'), 'utf-8');
81
- }
82
- /**
83
- * 获取 GitHub Actions pull-request workflow 模板内容
84
- */
85
- export function getPullRequestWorkflowTemplate() {
86
- return fs.readFileSync(path.join(TEMPLATES_DIR, '.github/workflows/pull-request.yml'), 'utf-8');
87
- }
88
- /**
89
- * 获取 .husky/pre-commit 模板内容
90
- */
91
- export function getHuskyPreCommitTemplate() {
92
- return fs.readFileSync(path.join(TEMPLATES_DIR, '.husky/pre-commit'), 'utf-8');
93
- }
94
- /**
95
- * 获取 LICENSE 模板内容
96
- */
97
- export function getLicenseTemplate(ctx = {}) {
98
- const year = ctx.year || new Date().getFullYear();
99
- const template = fs.readFileSync(path.join(TEMPLATES_DIR, 'LICENSE'), 'utf-8');
100
- return template.replace('{{year}}', String(year));
101
- }
102
- /**
103
- * 获取 .vscode/settings.json 模板内容
104
- */
105
- export function getVscodeSettingsTemplate() {
106
- return fs.readFileSync(path.join(TEMPLATES_DIR, '.vscode/settings.json'), 'utf-8');
107
- }
108
- /**
109
- * 可能的 schema 路径列表(按优先级排序)
110
- */
111
- const SCHEMA_PATHS = [
112
- './schemas/feng3d.schema.json',
113
- './node_modules/feng3d-cli/schemas/feng3d.schema.json',
114
- ];
115
- /**
116
- * 检测可用的 schema 路径
117
- * 优先级:当前项目 -> 依赖目录
118
- */
119
- export function detectSchemaPath(projectDir) {
120
- for (const schemaPath of SCHEMA_PATHS) {
121
- const fullPath = path.join(projectDir, schemaPath);
122
- if (fs.existsSync(fullPath)) {
123
- return schemaPath;
124
- }
125
- }
126
- // 默认返回 node_modules 路径
127
- return SCHEMA_PATHS[1];
128
- }
129
- /**
130
- * 获取 feng3d.json 模板内容
131
- */
132
- export function getFeng3dConfigTemplate(options) {
133
- const templateContent = fs.readFileSync(path.join(TEMPLATES_DIR, 'feng3d.json'), 'utf-8');
134
- const content = templateContent.replace(/\{\{name\}\}/g, options.name);
135
- const config = JSON.parse(content);
136
- // 如果提供了 schemaPath,则使用它
137
- if (options.schemaPath) {
138
- config.$schema = options.schemaPath;
139
- }
140
- return config;
141
- }
142
- // 为了向后兼容,保留原有的变量导出
143
- /** @deprecated 请使用 getGitignoreTemplate() 函数 */
144
- export const gitignoreTemplate = getGitignoreTemplate();
145
- /** @deprecated 请使用 getCursorrrulesTemplate() 函数 */
146
- export const cursorrrulesTemplate = getCursorrrulesTemplate();
147
- /** @deprecated 请使用 getTsconfigTemplate() 函数 */
148
- export const tsconfigTemplate = getTsconfigTemplate();
149
- /** @deprecated 请使用 getVitestConfigTemplate() 函数 */
150
- export const vitestConfigTemplate = getVitestConfigTemplate();
151
- /** @deprecated 请使用 getTypedocConfig() 函数 */
152
- export const createTypedocConfig = getTypedocConfig;
153
- //# sourceMappingURL=templates.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"templates.js","sourceRoot":"","sources":["../src/templates.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,EAAE,MAAM,UAAU,CAAC;AAC1B,OAAO,IAAI,MAAM,MAAM,CAAC;AACxB,OAAO,EAAE,aAAa,EAAE,MAAM,KAAK,CAAC;AAEp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CAAC,KAAK,CAAC,OAAO,CAAC,CAAC;IAEnC,wBAAwB;IACxB,IAAI,OAAO,CAAC,UAAU,EACtB,CAAC;QACG,MAAM,CAAC,OAAO,GAAG,OAAO,CAAC,UAAU,CAAC;IACxC,CAAC;IAED,OAAO,MAAM,CAAC;AAClB,CAAC;AAED,mBAAmB;AACnB,gDAAgD;AAChD,MAAM,CAAC,MAAM,iBAAiB,GAAG,oBAAoB,EAAE,CAAC;AACxD,mDAAmD;AACnD,MAAM,CAAC,MAAM,oBAAoB,GAAG,uBAAuB,EAAE,CAAC;AAC9D,+CAA+C;AAC/C,MAAM,CAAC,MAAM,gBAAgB,GAAG,mBAAmB,EAAE,CAAC;AACtD,mDAAmD;AACnD,MAAM,CAAC,MAAM,oBAAoB,GAAG,uBAAuB,EAAE,CAAC;AAC9D,4CAA4C;AAC5C,MAAM,CAAC,MAAM,mBAAmB,GAAG,gBAAgB,CAAC"}
@@ -1,50 +0,0 @@
1
- /**
2
- * feng3d 项目配置类型定义
3
- */
4
- /**
5
- * 默认更新配置(全部启用)
6
- */
7
- export const DEFAULT_UPDATE_CONFIG = {
8
- config: true,
9
- eslint: true,
10
- gitignore: true,
11
- cursorrules: true,
12
- publish: true,
13
- pages: true,
14
- pullRequest: true,
15
- typedoc: true,
16
- test: true,
17
- deps: true,
18
- husky: true,
19
- license: true,
20
- vscode: true,
21
- tsconfig: true,
22
- };
23
- /**
24
- * 默认配置
25
- */
26
- export const DEFAULT_CONFIG = {
27
- eslint: {
28
- enabled: true,
29
- ignores: [],
30
- rules: {},
31
- },
32
- vitest: {
33
- enabled: true,
34
- testTimeout: 0,
35
- },
36
- typedoc: {
37
- enabled: true,
38
- outDir: 'public',
39
- },
40
- oss: {
41
- localDir: './public',
42
- ossDir: '',
43
- },
44
- templates: {
45
- examples: true,
46
- test: true,
47
- },
48
- update: DEFAULT_UPDATE_CONFIG,
49
- };
50
- //# sourceMappingURL=config.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"config.js","sourceRoot":"","sources":["../../src/types/config.ts"],"names":[],"mappings":"AAAA;;GAEG;AA4GH;;GAEG;AACH,MAAM,CAAC,MAAM,qBAAqB,GAAiB;IAC/C,MAAM,EAAE,IAAI;IACZ,MAAM,EAAE,IAAI;IACZ,SAAS,EAAE,IAAI;IACf,WAAW,EAAE,IAAI;IACjB,OAAO,EAAE,IAAI;IACb,KAAK,EAAE,IAAI;IACX,WAAW,EAAE,IAAI;IACjB,OAAO,EAAE,IAAI;IACb,IAAI,EAAE,IAAI;IACV,IAAI,EAAE,IAAI;IACV,KAAK,EAAE,IAAI;IACX,OAAO,EAAE,IAAI;IACb,MAAM,EAAE,IAAI;IACZ,QAAQ,EAAE,IAAI;CACjB,CAAC;AAEF;;GAEG;AACH,MAAM,CAAC,MAAM,cAAc,GAAiB;IACxC,MAAM,EAAE;QACJ,OAAO,EAAE,IAAI;QACb,OAAO,EAAE,EAAE;QACX,KAAK,EAAE,EAAE;KACZ;IACD,MAAM,EAAE;QACJ,OAAO,EAAE,IAAI;QACb,WAAW,EAAE,CAAC;KACjB;IACD,OAAO,EAAE;QACL,OAAO,EAAE,IAAI;QACb,MAAM,EAAE,QAAQ;KACnB;IACD,GAAG,EAAE;QACD,QAAQ,EAAE,UAAU;QACpB,MAAM,EAAE,EAAE;KACb;IACD,SAAS,EAAE;QACP,QAAQ,EAAE,IAAI;QACd,IAAI,EAAE,IAAI;KACb;IACD,MAAM,EAAE,qBAAqB;CAChC,CAAC"}
package/dist/versions.js DELETED
@@ -1,60 +0,0 @@
1
- /**
2
- * feng3d 项目统一依赖版本
3
- */
4
- export const VERSIONS = {
5
- // TypeScript 相关
6
- typescript: '5.8.3',
7
- tslib: '^2.8.1',
8
- // ESLint 相关
9
- eslint: '9.26.0',
10
- '@eslint/js': '^9.0.0',
11
- '@typescript-eslint/eslint-plugin': '8.32.1',
12
- '@typescript-eslint/parser': '8.32.1',
13
- 'typescript-eslint': '^8.32.1',
14
- globals: '^14.0.0',
15
- // 测试相关
16
- vitest: '^3.1.3',
17
- '@vitest/coverage-v8': '^3.2.4',
18
- 'happy-dom': '^20.0.11',
19
- // 构建工具
20
- vite: '^6.3.5',
21
- rimraf: '6.0.1',
22
- 'cross-env': '7.0.3',
23
- // 文档
24
- typedoc: '^0.28.4',
25
- // Git hooks
26
- husky: '^9.1.7',
27
- 'lint-staged': '^15.2.10',
28
- };
29
- /**
30
- * 获取 devDependencies 配置
31
- */
32
- export function getDevDependencies(options = {}) {
33
- const deps = {
34
- '@eslint/js': VERSIONS['@eslint/js'],
35
- '@typescript-eslint/eslint-plugin': VERSIONS['@typescript-eslint/eslint-plugin'],
36
- '@typescript-eslint/parser': VERSIONS['@typescript-eslint/parser'],
37
- 'cross-env': VERSIONS['cross-env'],
38
- eslint: VERSIONS.eslint,
39
- globals: VERSIONS.globals,
40
- rimraf: VERSIONS.rimraf,
41
- tslib: VERSIONS.tslib,
42
- typescript: VERSIONS.typescript,
43
- 'typescript-eslint': VERSIONS['typescript-eslint'],
44
- vite: VERSIONS.vite,
45
- };
46
- if (options.includeVitest !== false) {
47
- deps.vitest = VERSIONS.vitest;
48
- }
49
- if (options.includeCoverage) {
50
- deps['@vitest/coverage-v8'] = VERSIONS['@vitest/coverage-v8'];
51
- }
52
- if (options.includeTypedoc !== false) {
53
- deps.typedoc = VERSIONS.typedoc;
54
- }
55
- // 默认包含 husky 和 lint-staged
56
- deps.husky = VERSIONS.husky;
57
- deps['lint-staged'] = VERSIONS['lint-staged'];
58
- return deps;
59
- }
60
- //# sourceMappingURL=versions.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"versions.js","sourceRoot":"","sources":["../src/versions.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,MAAM,CAAC,MAAM,QAAQ,GAAG;IACpB,gBAAgB;IAChB,UAAU,EAAE,OAAO;IACnB,KAAK,EAAE,QAAQ;IAEf,YAAY;IACZ,MAAM,EAAE,QAAQ;IAChB,YAAY,EAAE,QAAQ;IACtB,kCAAkC,EAAE,Q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,OAAO,GAAG,QAAQ,CAAC,OAAO,CAAC;IACpC,CAAC;IAED,2BAA2B;IAC3B,IAAI,CAAC,KAAK,GAAG,QAAQ,CAAC,KAAK,CAAC;IAC5B,IAAI,CAAC,aAAa,CAAC,GAAG,QAAQ,CAAC,aAAa,CAAC,CAAC;IAE9C,OAAO,IAAI,CAAC;AAChB,CAAC"}
@@ -1,8 +0,0 @@
1
- import { defineConfig } from 'vitest/config';
2
-
3
- export default defineConfig({
4
- test: {
5
- testTimeout: 0,
6
- },
7
- });
8
-
File without changes
File without changes