create-newt-app 0.15.2 → 0.17.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 +15 -4
- 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.
|
|
10
|
+
version: "0.17.0",
|
|
11
11
|
private: false,
|
|
12
12
|
type: "module",
|
|
13
13
|
bin: {
|
|
@@ -237,6 +237,10 @@ async function doInit(options) {
|
|
|
237
237
|
message: "Use NestJS for dependency injection only?",
|
|
238
238
|
initialValue: false
|
|
239
239
|
}),
|
|
240
|
+
todoExample: () => p.confirm({
|
|
241
|
+
message: "Include the todo example?",
|
|
242
|
+
initialValue: true
|
|
243
|
+
}),
|
|
240
244
|
deployment: () => p.select({
|
|
241
245
|
message: "Deployment extras?",
|
|
242
246
|
options: [
|
|
@@ -260,6 +264,7 @@ async function doInit(options) {
|
|
|
260
264
|
const testing = options.ci ? options.testing : group2.testing ?? "jest";
|
|
261
265
|
const deployment = options.ci ? options.deployment : group2.deployment ?? "none";
|
|
262
266
|
const nestDiOnly = options.ci ? options.nestDiOnly : group2.nestDiOnly ?? false;
|
|
267
|
+
const todoExample = options.ci ? !options.bare : group2.todoExample ?? true;
|
|
263
268
|
const deploymentModule = deployment === "standalone" ? templates.deploymentStandalone : deployment === "custom-server" ? templates.deploymentCustomServer : deployment === "spa" ? templates.deploymentSpa : null;
|
|
264
269
|
const allModules = [
|
|
265
270
|
templates.root,
|
|
@@ -271,7 +276,12 @@ async function doInit(options) {
|
|
|
271
276
|
templates.typescriptConfig,
|
|
272
277
|
testing === "vitest" ? templates.testingVitest : templates.testingJest,
|
|
273
278
|
...deploymentModule ? [deploymentModule] : [],
|
|
274
|
-
...nestDiOnly ? [templates.nestDiOnly] : [templates.apiControllers]
|
|
279
|
+
...nestDiOnly ? [templates.nestDiOnly] : [templates.apiControllers],
|
|
280
|
+
...todoExample ? [
|
|
281
|
+
templates.todoExampleApi,
|
|
282
|
+
...nestDiOnly ? [templates.todoExampleDi] : [templates.todoExampleControllers],
|
|
283
|
+
useShadcn ? templates.todoExampleShadcn : templates.todoExampleWeb
|
|
284
|
+
] : []
|
|
275
285
|
];
|
|
276
286
|
const name = group2.name ?? options.name ?? "";
|
|
277
287
|
const taskBuilder = new TaskBuilder();
|
|
@@ -332,7 +342,7 @@ async function doInit(options) {
|
|
|
332
342
|
}
|
|
333
343
|
}
|
|
334
344
|
var program = new Command();
|
|
335
|
-
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("--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).action(
|
|
345
|
+
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("--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(
|
|
336
346
|
async (name, options) => {
|
|
337
347
|
intro(`Create a ${chalk.blue("newt")} app.`);
|
|
338
348
|
await doInit({
|
|
@@ -343,7 +353,8 @@ program.name("create-newt-app").version(package_default.version).description("Cr
|
|
|
343
353
|
shadcn: options.shadcn,
|
|
344
354
|
testing: options.testing === "vitest" ? "vitest" : "jest",
|
|
345
355
|
deployment: ["standalone", "custom-server", "spa"].includes(options.deployment) ? options.deployment : "none",
|
|
346
|
-
nestDiOnly: options.nestDiOnly
|
|
356
|
+
nestDiOnly: options.nestDiOnly,
|
|
357
|
+
bare: options.bare
|
|
347
358
|
});
|
|
348
359
|
}
|
|
349
360
|
);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "create-newt-app",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.17.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.
|
|
19
|
+
"@newt-app/templates": "0.17.0"
|
|
20
20
|
},
|
|
21
21
|
"devDependencies": {
|
|
22
22
|
"@types/ejs": "^3.1.5",
|