@modern-js/mwa-generator 3.4.17 → 3.6.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.
package/dist/index.js CHANGED
@@ -51057,12 +51057,12 @@ __export(src_exports, {
51057
51057
  module.exports = __toCommonJS(src_exports);
51058
51058
  var import_path7 = __toESM(require("path"));
51059
51059
 
51060
- // ../../../../node_modules/.pnpm/@modern-js+codesmith@2.4.1/node_modules/@modern-js/codesmith/dist/esm-node/materials/FsResource.js
51060
+ // ../../../../node_modules/.pnpm/@modern-js+codesmith@2.4.2/node_modules/@modern-js/codesmith/dist/esm-node/materials/FsResource.js
51061
51061
  var import_path = __toESM(require("path"));
51062
51062
  var import_utils = require("@modern-js/utils");
51063
51063
  var FS_RESOURCE = "_codesmith_core_fs_resource";
51064
51064
 
51065
- // ../../../../node_modules/.pnpm/@modern-js+codesmith@2.4.1/node_modules/@modern-js/codesmith/dist/esm-node/utils/fsExists.js
51065
+ // ../../../../node_modules/.pnpm/@modern-js+codesmith@2.4.2/node_modules/@modern-js/codesmith/dist/esm-node/utils/fsExists.js
51066
51066
  var import_utils2 = require("@modern-js/utils");
51067
51067
  async function fsExists(path7) {
51068
51068
  try {
@@ -51073,13 +51073,13 @@ async function fsExists(path7) {
51073
51073
  }
51074
51074
  }
51075
51075
 
51076
- // ../../../../node_modules/.pnpm/@modern-js+codesmith-api-ejs@2.4.1_@modern-js+codesmith@2.4.1/node_modules/@modern-js/codesmith-api-ejs/dist/esm-node/utils/renderString.js
51076
+ // ../../../../node_modules/.pnpm/@modern-js+codesmith-api-ejs@2.4.2_@modern-js+codesmith@2.4.2/node_modules/@modern-js/codesmith-api-ejs/dist/esm-node/utils/renderString.js
51077
51077
  var import_ejs = __toESM(require_ejs());
51078
51078
  function renderString(template, fullData) {
51079
51079
  return import_ejs.default.render(template, fullData) || "";
51080
51080
  }
51081
51081
 
51082
- // ../../../../node_modules/.pnpm/@modern-js+codesmith-api-ejs@2.4.1_@modern-js+codesmith@2.4.1/node_modules/@modern-js/codesmith-api-ejs/dist/esm-node/index.js
51082
+ // ../../../../node_modules/.pnpm/@modern-js+codesmith-api-ejs@2.4.2_@modern-js+codesmith@2.4.2/node_modules/@modern-js/codesmith-api-ejs/dist/esm-node/index.js
51083
51083
  var EjsAPI = class {
51084
51084
  async renderTemplate(templateResource, target, parameters = {}) {
51085
51085
  if (templateResource._type !== FS_RESOURCE) {
@@ -51111,7 +51111,7 @@ var EjsAPI = class {
51111
51111
  }
51112
51112
  };
51113
51113
 
51114
- // ../../../../node_modules/.pnpm/@modern-js+codesmith-api-fs@2.4.1_@modern-js+codesmith@2.4.1/node_modules/@modern-js/codesmith-api-fs/dist/esm-node/index.js
51114
+ // ../../../../node_modules/.pnpm/@modern-js+codesmith-api-fs@2.4.2_@modern-js+codesmith@2.4.2/node_modules/@modern-js/codesmith-api-fs/dist/esm-node/index.js
51115
51115
  var import_path2 = __toESM(require("path"));
51116
51116
  var import_utils4 = require("@modern-js/utils");
51117
51117
  var FsAPI = class {
@@ -51138,7 +51138,7 @@ var FsAPI = class {
51138
51138
  }
51139
51139
  };
51140
51140
 
51141
- // ../../../../node_modules/.pnpm/@modern-js+codesmith-api-git@2.4.1_@modern-js+codesmith@2.4.1/node_modules/@modern-js/codesmith-api-git/dist/esm-node/utils/index.js
51141
+ // ../../../../node_modules/.pnpm/@modern-js+codesmith-api-git@2.4.2_@modern-js+codesmith@2.4.2/node_modules/@modern-js/codesmith-api-git/dist/esm-node/utils/index.js
51142
51142
  var import_utils5 = require("@modern-js/utils");
51143
51143
  async function canUseGit() {
51144
51144
  try {
@@ -51213,7 +51213,7 @@ async function gitCommit(cwd, commitMessage) {
51213
51213
  });
51214
51214
  }
51215
51215
 
51216
- // ../../../../node_modules/.pnpm/@modern-js+codesmith-api-git@2.4.1_@modern-js+codesmith@2.4.1/node_modules/@modern-js/codesmith-api-git/dist/esm-node/index.js
51216
+ // ../../../../node_modules/.pnpm/@modern-js+codesmith-api-git@2.4.2_@modern-js+codesmith@2.4.2/node_modules/@modern-js/codesmith-api-git/dist/esm-node/index.js
51217
51217
  var GitAPI = class {
51218
51218
  async isInGitRepo(cwd = this.generatorCore.outputPath) {
51219
51219
  const canUse = await canUseGit();
@@ -51263,7 +51263,7 @@ var GitAPI = class {
51263
51263
  }
51264
51264
  };
51265
51265
 
51266
- // ../../../../node_modules/.pnpm/@modern-js+codesmith-api-handlebars@2.4.1_@modern-js+codesmith@2.4.1/node_modules/@modern-js/codesmith-api-handlebars/dist/esm-node/utils/renderString.js
51266
+ // ../../../../node_modules/.pnpm/@modern-js+codesmith-api-handlebars@2.4.2_@modern-js+codesmith@2.4.2/node_modules/@modern-js/codesmith-api-handlebars/dist/esm-node/utils/renderString.js
51267
51267
  var import_handlebars = __toESM(require_lib());
51268
51268
  function renderString2(template, fullData, registers) {
51269
51269
  const helpers = {
@@ -51277,7 +51277,7 @@ function renderString2(template, fullData, registers) {
51277
51277
  return import_handlebars.default.compile(template)(fullData) || "";
51278
51278
  }
51279
51279
 
51280
- // ../../../../node_modules/.pnpm/@modern-js+codesmith-api-handlebars@2.4.1_@modern-js+codesmith@2.4.1/node_modules/@modern-js/codesmith-api-handlebars/dist/esm-node/index.js
51280
+ // ../../../../node_modules/.pnpm/@modern-js+codesmith-api-handlebars@2.4.2_@modern-js+codesmith@2.4.2/node_modules/@modern-js/codesmith-api-handlebars/dist/esm-node/index.js
51281
51281
  var HandlebarsAPI = class {
51282
51282
  async registerHelp(helpers) {
51283
51283
  this.registers.helpers = {
@@ -51325,7 +51325,7 @@ var HandlebarsAPI = class {
51325
51325
  }
51326
51326
  };
51327
51327
 
51328
- // ../../../../node_modules/.pnpm/@modern-js+codesmith-api-npm@2.4.1/node_modules/@modern-js/codesmith-api-npm/dist/esm-node/utils/env.js
51328
+ // ../../../../node_modules/.pnpm/@modern-js+codesmith-api-npm@2.4.2/node_modules/@modern-js/codesmith-api-npm/dist/esm-node/utils/env.js
51329
51329
  var import_utils8 = require("@modern-js/utils");
51330
51330
  async function canUseNvm() {
51331
51331
  try {
@@ -51375,7 +51375,7 @@ async function canUsePnpm() {
51375
51375
  }
51376
51376
  }
51377
51377
 
51378
- // ../../../../node_modules/.pnpm/@modern-js+codesmith-api-npm@2.4.1/node_modules/@modern-js/codesmith-api-npm/dist/esm-node/utils/install.js
51378
+ // ../../../../node_modules/.pnpm/@modern-js+codesmith-api-npm@2.4.2/node_modules/@modern-js/codesmith-api-npm/dist/esm-node/utils/install.js
51379
51379
  var import_utils9 = require("@modern-js/utils");
51380
51380
  function execaWithStreamLog(command, args, options) {
51381
51381
  const promise = (0, import_utils9.execa)(command, args, {
@@ -51471,7 +51471,7 @@ async function pnpmInstall({ cwd, registryUrl, ignoreScripts, useNvm }) {
51471
51471
  throw new Error("please install pnpm first");
51472
51472
  }
51473
51473
 
51474
- // ../../../../node_modules/.pnpm/@modern-js+codesmith-api-npm@2.4.1/node_modules/@modern-js/codesmith-api-npm/dist/esm-node/index.js
51474
+ // ../../../../node_modules/.pnpm/@modern-js+codesmith-api-npm@2.4.2/node_modules/@modern-js/codesmith-api-npm/dist/esm-node/index.js
51475
51475
  var NpmAPI = class {
51476
51476
  npmInstall({ cwd, registryUrl, ignoreScripts }) {
51477
51477
  return npmInstall({
@@ -61055,10 +61055,10 @@ var Schema = (
61055
61055
  }()
61056
61056
  );
61057
61057
 
61058
- // ../../../../node_modules/.pnpm/@modern-js+codesmith-formily@2.4.1_@modern-js+codesmith@2.4.1_typescript@5.3.3/node_modules/@modern-js/codesmith-formily/dist/esm-node/prompt.js
61058
+ // ../../../../node_modules/.pnpm/@modern-js+codesmith-formily@2.4.2_@modern-js+codesmith@2.4.2_typescript@5.3.3/node_modules/@modern-js/codesmith-formily/dist/esm-node/prompt.js
61059
61059
  var import_inquirer = __toESM(require_inquirer());
61060
61060
 
61061
- // ../../../../node_modules/.pnpm/@modern-js+codesmith-formily@2.4.1_@modern-js+codesmith@2.4.1_typescript@5.3.3/node_modules/@modern-js/codesmith-formily/dist/esm-node/transform.js
61061
+ // ../../../../node_modules/.pnpm/@modern-js+codesmith-formily@2.4.2_@modern-js+codesmith@2.4.2_typescript@5.3.3/node_modules/@modern-js/codesmith-formily/dist/esm-node/transform.js
61062
61062
  var import_lodash = require("@modern-js/utils/lodash");
61063
61063
  function validateSchema(schema) {
61064
61064
  const { type, properties } = schema;
@@ -61150,7 +61150,7 @@ function transformForm(schema, configValue = {}, validateMap, initValue) {
61150
61150
  return getQuestionFromSchema(schema, configValue, validateMap, initValue);
61151
61151
  }
61152
61152
 
61153
- // ../../../../node_modules/.pnpm/@modern-js+codesmith-formily@2.4.1_@modern-js+codesmith@2.4.1_typescript@5.3.3/node_modules/@modern-js/codesmith-formily/dist/esm-node/prompt.js
61153
+ // ../../../../node_modules/.pnpm/@modern-js+codesmith-formily@2.4.2_@modern-js+codesmith@2.4.2_typescript@5.3.3/node_modules/@modern-js/codesmith-formily/dist/esm-node/prompt.js
61154
61154
  var compileRule = (rule, scope) => {
61155
61155
  const state = Schema.compile(rule, {
61156
61156
  $self: {},
@@ -61254,7 +61254,7 @@ async function prompt(schema, configValue = {}, validateMap, initValue) {
61254
61254
  return answers;
61255
61255
  }
61256
61256
 
61257
- // ../../../../node_modules/.pnpm/@modern-js+codesmith-formily@2.4.1_@modern-js+codesmith@2.4.1_typescript@5.3.3/node_modules/@modern-js/codesmith-formily/dist/esm-node/inquirer.js
61257
+ // ../../../../node_modules/.pnpm/@modern-js+codesmith-formily@2.4.2_@modern-js+codesmith@2.4.2_typescript@5.3.3/node_modules/@modern-js/codesmith-formily/dist/esm-node/inquirer.js
61258
61258
  var CLIReader = class {
61259
61259
  getAnswers() {
61260
61260
  return this.answers;
@@ -61283,7 +61283,7 @@ var CLIReader = class {
61283
61283
  }
61284
61284
  };
61285
61285
 
61286
- // ../../../../node_modules/.pnpm/@modern-js+codesmith-api-app@2.4.1_@modern-js+codesmith@2.4.1_typescript@5.3.3/node_modules/@modern-js/codesmith-api-app/dist/esm-node/index.js
61286
+ // ../../../../node_modules/.pnpm/@modern-js+codesmith-api-app@2.4.2_@modern-js+codesmith@2.4.2_typescript@5.3.3/node_modules/@modern-js/codesmith-api-app/dist/esm-node/index.js
61287
61287
  var import_utils13 = require("@modern-js/utils");
61288
61288
  var import_lodash5 = require("@modern-js/utils/lodash");
61289
61289
  var import_comment_json = __toESM(require_src2());
@@ -61352,7 +61352,7 @@ var I18n = class {
61352
61352
  }
61353
61353
  };
61354
61354
 
61355
- // ../../../../node_modules/.pnpm/@modern-js+codesmith-api-app@2.4.1_@modern-js+codesmith@2.4.1_typescript@5.3.3/node_modules/@modern-js/codesmith-api-app/dist/esm-node/locale/en.js
61355
+ // ../../../../node_modules/.pnpm/@modern-js+codesmith-api-app@2.4.2_@modern-js+codesmith@2.4.2_typescript@5.3.3/node_modules/@modern-js/codesmith-api-app/dist/esm-node/locale/en.js
61356
61356
  var EN_LOCALE = {
61357
61357
  environment: {
61358
61358
  node_version: "please upgrade node to lts version",
@@ -61379,7 +61379,7 @@ var EN_LOCALE = {
61379
61379
  }
61380
61380
  };
61381
61381
 
61382
- // ../../../../node_modules/.pnpm/@modern-js+codesmith-api-app@2.4.1_@modern-js+codesmith@2.4.1_typescript@5.3.3/node_modules/@modern-js/codesmith-api-app/dist/esm-node/locale/zh.js
61382
+ // ../../../../node_modules/.pnpm/@modern-js+codesmith-api-app@2.4.2_@modern-js+codesmith@2.4.2_typescript@5.3.3/node_modules/@modern-js/codesmith-api-app/dist/esm-node/locale/zh.js
61383
61383
  var ZH_LOCALE = {
61384
61384
  environment: {
61385
61385
  node_version: "请升级 Node 版本至 LIS",
@@ -61406,14 +61406,14 @@ var ZH_LOCALE = {
61406
61406
  }
61407
61407
  };
61408
61408
 
61409
- // ../../../../node_modules/.pnpm/@modern-js+codesmith-api-app@2.4.1_@modern-js+codesmith@2.4.1_typescript@5.3.3/node_modules/@modern-js/codesmith-api-app/dist/esm-node/locale/index.js
61409
+ // ../../../../node_modules/.pnpm/@modern-js+codesmith-api-app@2.4.2_@modern-js+codesmith@2.4.2_typescript@5.3.3/node_modules/@modern-js/codesmith-api-app/dist/esm-node/locale/index.js
61410
61410
  var i18n = new I18n();
61411
61411
  var localeKeys = i18n.init("zh", {
61412
61412
  zh: ZH_LOCALE,
61413
61413
  en: EN_LOCALE
61414
61414
  });
61415
61415
 
61416
- // ../../../../node_modules/.pnpm/@modern-js+codesmith-api-app@2.4.1_@modern-js+codesmith@2.4.1_typescript@5.3.3/node_modules/@modern-js/codesmith-api-app/dist/esm-node/utils/checkUseNvm.js
61416
+ // ../../../../node_modules/.pnpm/@modern-js+codesmith-api-app@2.4.2_@modern-js+codesmith@2.4.2_typescript@5.3.3/node_modules/@modern-js/codesmith-api-app/dist/esm-node/utils/checkUseNvm.js
61417
61417
  var import_path4 = __toESM(require("path"));
61418
61418
  var import_utils12 = require("@modern-js/utils");
61419
61419
  var NODE_MAJOR_VERSION_MAP = {
@@ -61461,7 +61461,7 @@ async function checkUseNvm(cwd, logger) {
61461
61461
  }
61462
61462
  }
61463
61463
 
61464
- // ../../../../node_modules/.pnpm/@modern-js+codesmith-api-app@2.4.1_@modern-js+codesmith@2.4.1_typescript@5.3.3/node_modules/@modern-js/codesmith-api-app/dist/esm-node/utils/transform.js
61464
+ // ../../../../node_modules/.pnpm/@modern-js+codesmith-api-app@2.4.2_@modern-js+codesmith@2.4.2_typescript@5.3.3/node_modules/@modern-js/codesmith-api-app/dist/esm-node/utils/transform.js
61465
61465
  var import_lodash4 = require("@modern-js/utils/lodash");
61466
61466
  function transformInquirerSchema(questions, configValue = {}, validateMap = {}, initValue = {}) {
61467
61467
  for (const question of questions) {
@@ -61489,7 +61489,7 @@ function transformInquirerSchema(questions, configValue = {}, validateMap = {},
61489
61489
  return questions;
61490
61490
  }
61491
61491
 
61492
- // ../../../../node_modules/.pnpm/@modern-js+codesmith-api-app@2.4.1_@modern-js+codesmith@2.4.1_typescript@5.3.3/node_modules/@modern-js/codesmith-api-app/dist/esm-node/index.js
61492
+ // ../../../../node_modules/.pnpm/@modern-js+codesmith-api-app@2.4.2_@modern-js+codesmith@2.4.2_typescript@5.3.3/node_modules/@modern-js/codesmith-api-app/dist/esm-node/index.js
61493
61493
  var AppAPI = class {
61494
61494
  async checkEnvironment(nodeVersion) {
61495
61495
  if (import_utils13.semver.lt(process.versions.node, nodeVersion || "12.22.12")) {
@@ -61868,11 +61868,6 @@ var EN_LOCALE2 = {
61868
61868
  func: "Function",
61869
61869
  framework: "Framework"
61870
61870
  }
61871
- },
61872
- buildTools: {
61873
- self: "Please select the bundler:",
61874
- webpack: "webpack",
61875
- rspack: "Rspack (experimental)"
61876
61871
  }
61877
61872
  };
61878
61873
 
@@ -61960,11 +61955,6 @@ var ZH_LOCALE2 = {
61960
61955
  func: "函数模式",
61961
61956
  framework: "框架模式"
61962
61957
  }
61963
- },
61964
- buildTools: {
61965
- self: "请选择构建工具",
61966
- webpack: "webpack",
61967
- rspack: "Rspack (实验性)"
61968
61958
  }
61969
61959
  };
61970
61960
 
@@ -62105,36 +62095,13 @@ var getPackagePathSchema = (extra) => {
62105
62095
  };
62106
62096
  };
62107
62097
 
62108
- // ../../generator-common/dist/esm-node/mwa/common.js
62109
- var Framework;
62110
- (function(Framework2) {
62111
- Framework2["Express"] = "express";
62112
- Framework2["Koa"] = "koa";
62113
- })(Framework || (Framework = {}));
62114
- var BuildTools;
62115
- (function(BuildTools2) {
62116
- BuildTools2["Webpack"] = "webpack";
62117
- BuildTools2["Rspack"] = "rspack";
62118
- })(BuildTools || (BuildTools = {}));
62119
- var getBuildToolsSchema = (_extra = {}) => {
62120
- return {
62121
- type: "string",
62122
- title: i18n2.t(localeKeys2.buildTools.self),
62123
- enum: Object.values(BuildTools).map((tool) => ({
62124
- value: tool,
62125
- label: i18n2.t(localeKeys2.buildTools[tool])
62126
- }))
62127
- };
62128
- };
62129
-
62130
62098
  // ../../generator-common/dist/esm-node/mwa/project.js
62131
62099
  var getMWASchemaProperties = (extra) => {
62132
62100
  return {
62133
62101
  packageName: getPackageNameSchema(extra),
62134
62102
  packagePath: getPackagePathSchema(extra),
62135
62103
  language: getLanguageSchema(extra),
62136
- packageManager: getPackageManagerSchema(extra),
62137
- buildTools: getBuildToolsSchema(extra)
62104
+ packageManager: getPackageManagerSchema(extra)
62138
62105
  };
62139
62106
  };
62140
62107
  var getMWASchema = (extra = {}) => {
@@ -62146,8 +62113,7 @@ var getMWASchema = (extra = {}) => {
62146
62113
  var MWADefaultConfig = {
62147
62114
  language: Language.TS,
62148
62115
  packageManager: PackageManager.Pnpm,
62149
- needModifyMWAConfig: BooleanConfig.NO,
62150
- buildTools: BuildTools.Webpack
62116
+ needModifyMWAConfig: BooleanConfig.NO
62151
62117
  };
62152
62118
 
62153
62119
  // ../../generator-utils/dist/esm/index.js
@@ -62391,8 +62357,8 @@ var handleTemplateFile = async (context, generator, appApi) => {
62391
62357
  );
62392
62358
  generator.logger.debug(`inputData=${JSON.stringify(ans)}`, ans);
62393
62359
  const { packageName, packagePath, language, packageManager } = ans;
62394
- const { packagesInfo, buildTools } = context.config;
62395
- const bundler = buildTools === BuildTools.Rspack ? `'experimental-rspack',` : `'webpack', // Set to 'experimental-rspack' to enable rspack ⚡️🦀`;
62360
+ const { packagesInfo } = context.config;
62361
+ const bundler = `'rspack', // Set to 'webpack' to enable webpack`;
62396
62362
  const projectPath = getMWAProjectPath(
62397
62363
  packagePath,
62398
62364
  isMonorepoSubProject
package/package.json CHANGED
@@ -15,7 +15,7 @@
15
15
  "modern",
16
16
  "modern.js"
17
17
  ],
18
- "version": "3.4.17",
18
+ "version": "3.6.0",
19
19
  "jsnext:source": "./src/index.ts",
20
20
  "main": "./dist/index.js",
21
21
  "files": [
@@ -23,24 +23,24 @@
23
23
  "/dist/index.js"
24
24
  ],
25
25
  "dependencies": {
26
- "@modern-js/utils": "2.58.3"
26
+ "@modern-js/utils": "2.60.0"
27
27
  },
28
28
  "devDependencies": {
29
- "@modern-js/codesmith": "2.4.1",
30
- "@modern-js/codesmith-api-app": "2.4.1",
29
+ "@modern-js/codesmith": "2.4.2",
30
+ "@modern-js/codesmith-api-app": "2.4.2",
31
31
  "@types/jest": "^29",
32
32
  "@types/node": "^14",
33
33
  "jest": "^29",
34
34
  "typescript": "^5",
35
- "@modern-js/base-generator": "3.4.17",
36
- "@modern-js/dependence-generator": "3.4.17",
37
- "@modern-js/entry-generator": "3.4.17",
38
- "@modern-js/generator-common": "3.4.17",
39
- "@modern-js/packages-generator": "3.4.17",
40
- "@modern-js/generator-utils": "3.4.17",
41
- "@modern-js/plugin-i18n": "2.58.3",
42
- "@scripts/jest-config": "2.58.3",
43
- "@scripts/build": "2.58.3"
35
+ "@modern-js/base-generator": "3.6.0",
36
+ "@modern-js/entry-generator": "3.6.0",
37
+ "@modern-js/generator-common": "3.6.0",
38
+ "@modern-js/dependence-generator": "3.6.0",
39
+ "@modern-js/generator-utils": "3.6.0",
40
+ "@scripts/build": "2.60.0",
41
+ "@scripts/jest-config": "2.60.0",
42
+ "@modern-js/packages-generator": "3.6.0",
43
+ "@modern-js/plugin-i18n": "2.60.0"
44
44
  },
45
45
  "sideEffects": false,
46
46
  "publishConfig": {
package/src/index.ts CHANGED
@@ -3,7 +3,6 @@ import type { GeneratorContext, GeneratorCore } from '@modern-js/codesmith';
3
3
  import { AppAPI } from '@modern-js/codesmith-api-app';
4
4
  import {
5
5
  BaseGenerator,
6
- BuildTools,
7
6
  EntryGenerator,
8
7
  Language,
9
8
  PackagesGenerator,
@@ -108,12 +107,9 @@ export const handleTemplateFile = async (
108
107
  generator.logger.debug(`inputData=${JSON.stringify(ans)}`, ans);
109
108
 
110
109
  const { packageName, packagePath, language, packageManager } = ans;
111
- const { packagesInfo, buildTools } = context.config;
110
+ const { packagesInfo } = context.config;
112
111
 
113
- const bundler =
114
- buildTools === BuildTools.Rspack
115
- ? `'experimental-rspack',`
116
- : `'webpack', // Set to 'experimental-rspack' to enable rspack ⚡️🦀`;
112
+ const bundler = `'rspack', // Set to 'webpack' to enable webpack`;
117
113
 
118
114
  const projectPath = getMWAProjectPath(
119
115
  packagePath as string,
@@ -2,15 +2,15 @@
2
2
  "name": "{{ name }}",
3
3
  "version": "0.1.0",
4
4
  "scripts": {
5
- "reset": "npx rimraf ./**/node_modules",
5
+ "reset": "npx rimraf node_modules ./**/node_modules",
6
6
  "dev": "modern dev",
7
7
  "build": "modern build",
8
8
  "start": "modern start",
9
9
  "serve": "modern serve",
10
10
  "new": "modern new",
11
- "lint": "modern lint",
11
+ "lint": "biome check",
12
12
  {{#unless isMonorepoSubProject}}
13
- "prepare": "husky install",
13
+ "prepare": "simple-git-hooks",
14
14
  {{/unless}}
15
15
  "upgrade": "modern upgrade"
16
16
  },
@@ -19,14 +19,13 @@
19
19
  "node": ">=16.18.1"
20
20
  },
21
21
  "lint-staged": {
22
- "*.{js,jsx,ts,tsx,mjs,cjs}": [
23
- "node --max_old_space_size=8192 ./node_modules/eslint/bin/eslint.js --fix --color --cache --quiet"
22
+ "*.{js,ts,cjs,mjs,d.cts,d.mts,jsx,tsx,json,jsonc}": [
23
+ "biome check --files-ignore-unknown=true"
24
24
  ]
25
25
  },
26
- "eslintIgnore": [
27
- "node_modules/",
28
- "dist/"
29
- ],
26
+ "simple-git-hooks": {
27
+ "pre-commit": "npx lint-staged"
28
+ },
30
29
  {{/unless}}
31
30
  "dependencies": {
32
31
  "@modern-js/runtime": "{{modernVersion}}",
@@ -35,9 +34,8 @@
35
34
  },
36
35
  "devDependencies": {
37
36
  "@modern-js/app-tools": "{{modernVersion}}",
38
- "@modern-js/eslint-config": "{{modernVersion}}",
39
37
  "@modern-js/tsconfig": "{{modernVersion}}",
40
- "@modern-js-app/eslint-config": "{{modernVersion}}",
38
+ "@biomejs/biome": "1.8.3",
41
39
  {{#if isTs}}
42
40
  "typescript": "~5.0.4",
43
41
  "@types/jest": "~29.2.4",
@@ -46,8 +44,7 @@
46
44
  "@types/react-dom": "~18.0.10",
47
45
  {{/if}}
48
46
  "lint-staged": "~13.1.0",
49
- "prettier": "~2.8.1",
50
- "husky": "~8.0.1",
51
- "rimraf": "~3.0.2"
47
+ "simple-git-hooks": "^2.11.1",
48
+ "rimraf": "^6.0.1"
52
49
  }
53
50
  }
@@ -1,4 +0,0 @@
1
- module.exports = {
2
- root: true,
3
- extends: ['@modern-js'],
4
- };
@@ -1,5 +0,0 @@
1
- // eslint-disable-next-line import/no-commonjs
2
- module.exports = {
3
- root: true,
4
- extends: ['@modern-js-app'],
5
- };
@@ -1,3 +0,0 @@
1
- import { defineRuntimeConfig } from '@modern-js/runtime';
2
-
3
- export default defineRuntimeConfig({});
@@ -1,4 +0,0 @@
1
- module.exports = {
2
- root: true,
3
- extends: ['@modern-js'],
4
- };
@@ -1,9 +0,0 @@
1
- // eslint-disable-next-line import/no-commonjs
2
- module.exports = {
3
- root: true,
4
- extends: ['@modern-js-app'],
5
- parserOptions: {
6
- tsconfigRootDir: __dirname,
7
- project: ['../tsconfig.json'],
8
- },
9
- };