create-newt-app 0.21.4 → 0.22.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 (2) hide show
  1. package/dist/index.js +13 -3
  2. package/package.json +2 -2
package/dist/index.js CHANGED
@@ -7,7 +7,7 @@ import chalk from "chalk";
7
7
  // package.json
8
8
  var package_default = {
9
9
  name: "create-newt-app",
10
- version: "0.21.4",
10
+ version: "0.22.0",
11
11
  private: false,
12
12
  type: "module",
13
13
  bin: {
@@ -242,6 +242,14 @@ async function doInit(options) {
242
242
  ],
243
243
  initialValue: "sqlite"
244
244
  }),
245
+ linter: () => p.select({
246
+ message: "Linter and formatter?",
247
+ options: [
248
+ { value: "eslint", label: "ESLint + Prettier" },
249
+ { value: "oxc", label: "oxlint + oxfmt" }
250
+ ],
251
+ initialValue: "eslint"
252
+ }),
245
253
  nestDiOnly: () => p.confirm({
246
254
  message: "Use NestJS for dependency injection only?",
247
255
  initialValue: false
@@ -272,6 +280,7 @@ async function doInit(options) {
272
280
  const useShadcn = options.ci ? options.shadcn : group2.shadcn ?? true;
273
281
  const testing = options.ci ? options.testing : group2.testing ?? "jest";
274
282
  const database = options.ci ? options.database : group2.database ?? "sqlite";
283
+ const linter = options.ci ? options.linter : group2.linter ?? "eslint";
275
284
  const deployment = options.ci ? options.deployment : group2.deployment ?? "none";
276
285
  const nestDiOnly = options.ci ? options.nestDiOnly : group2.nestDiOnly ?? false;
277
286
  const todoExample = options.ci ? !options.bare : group2.todoExample ?? true;
@@ -283,7 +292,7 @@ async function doInit(options) {
283
292
  database === "postgres" ? templates.dbPostgres : templates.dbSqlite,
284
293
  templates.auth,
285
294
  useShadcn ? templates.shadcnUi : templates.ui,
286
- templates.eslintConfig,
295
+ linter === "oxc" ? templates.oxc : templates.eslintConfig,
287
296
  templates.typescriptConfig,
288
297
  testing === "vitest" ? templates.testingVitest : templates.testingJest,
289
298
  ...deploymentModule ? [deploymentModule] : [],
@@ -351,7 +360,7 @@ async function doInit(options) {
351
360
  }
352
361
  }
353
362
  var program = new Command();
354
- program.name("create-newt-app").version(package_default.version).description("Create a new newt-app monorepo").argument("[name]").option("-ni, --no-install", "Skip pnpm install", true).option("-ng, --no-git", "Skip git initialization", true).option("--ci", "Non-interactive mode", false).option("--shadcn", "Include shadcn/ui (used with --ci)", false).option("--testing <framework>", "Testing framework: vitest or jest (used with --ci)", "jest").option("--database <database>", "Database: sqlite or postgres (used with --ci)", "sqlite").option("--deployment <strategy>", "Deployment extras: standalone, custom-server, spa (used with --ci)", "none").option("--nest-di-only", "Use NestJS for dependency injection only (used with --ci)", false).option("--bare", "Skip the todo example (used with --ci)", false).action(
363
+ program.name("create-newt-app").version(package_default.version).description("Create a new newt-app monorepo").argument("[name]").option("-ni, --no-install", "Skip pnpm install", true).option("-ng, --no-git", "Skip git initialization", true).option("--ci", "Non-interactive mode", false).option("--shadcn", "Include shadcn/ui (used with --ci)", false).option("--testing <framework>", "Testing framework: vitest or jest (used with --ci)", "jest").option("--database <database>", "Database: sqlite or postgres (used with --ci)", "sqlite").option("--linter <linter>", "Linter: eslint or oxc (used with --ci)", "eslint").option("--deployment <strategy>", "Deployment extras: standalone, custom-server, spa (used with --ci)", "none").option("--nest-di-only", "Use NestJS for dependency injection only (used with --ci)", false).option("--bare", "Skip the todo example (used with --ci)", false).action(
355
364
  async (name, options) => {
356
365
  intro(`Create a ${chalk.blue("newt")} app.`);
357
366
  await doInit({
@@ -362,6 +371,7 @@ program.name("create-newt-app").version(package_default.version).description("Cr
362
371
  shadcn: options.shadcn,
363
372
  testing: options.testing === "vitest" ? "vitest" : "jest",
364
373
  database: options.database === "postgres" ? "postgres" : "sqlite",
374
+ linter: options.linter === "oxc" ? "oxc" : "eslint",
365
375
  deployment: ["standalone", "custom-server", "spa"].includes(options.deployment) ? options.deployment : "none",
366
376
  nestDiOnly: options.nestDiOnly,
367
377
  bare: options.bare
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "create-newt-app",
3
- "version": "0.21.4",
3
+ "version": "0.22.0",
4
4
  "private": false,
5
5
  "type": "module",
6
6
  "bin": {
@@ -16,7 +16,7 @@
16
16
  "ejs": "^3.1.10",
17
17
  "execa": "^9.6.0",
18
18
  "zod": "^3.25.76",
19
- "@newt-app/templates": "0.21.4"
19
+ "@newt-app/templates": "0.22.0"
20
20
  },
21
21
  "devDependencies": {
22
22
  "@types/ejs": "^3.1.5",