Skip to content

Commit baa1fb8

Browse files
committed
feat: update .gitignore and add dependency templates for improved package management
1 parent 679489f commit baa1fb8

3 files changed

Lines changed: 25 additions & 9 deletions

File tree

create-arcstack/.gitignore

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,5 +8,4 @@ bin/*
88
.DS_Store
99
h3ravel
1010
arcstack
11-
arcstack-h3
12-
arcstack-express
11+
arcstack-*

create-arcstack/src/actions.ts

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ import path, { basename, join, relative } from "node:path";
55

66
import { Str } from "@h3ravel/support";
77
import { chdir } from "node:process";
8+
import { dependencyTemplates } from "./templates";
89
import { downloadTemplate } from "giget";
910
import { existsSync } from "node:fs";
1011

@@ -129,11 +130,19 @@ export default class {
129130
delete pkg.scripts.precmd;
130131
delete pkg.scripts.build;
131132
delete pkg.scripts.dev;
132-
pkg.name = Str.slugify(this.appName ?? basename(this.location!).replace(".", ""), "-");
133+
134+
pkg.name = Str.slugify(
135+
this.appName ?? basename(this.location!).replace('.', ''), '-'
136+
);
137+
133138
if (this.description) {
134139
pkg.description = this.description;
135140
}
136141

142+
for (const [name, version] of Object.entries(dependencyTemplates)) {
143+
pkg.dependencies[name] = version;
144+
}
145+
137146
await Promise.allSettled([
138147
writeFile(pkgPath, JSON.stringify(pkg, null, 2)),
139148
this.removeLockFile(),

create-arcstack/src/templates.ts

Lines changed: 14 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -25,12 +25,6 @@ export const templates: {
2525
hint: "An Express application starter kit",
2626
source: "github:toneflix/arcstack",
2727
},
28-
{
29-
name: "H3 Starter Kit",
30-
alias: "h3",
31-
hint: "A H3 application starter kit",
32-
source: "github:toneflix/arcstack",
33-
},
3428
{
3529
name: "Express Lean Starter Kit",
3630
alias: "express-lean",
@@ -39,6 +33,12 @@ export const templates: {
3933
lean: true,
4034
baseAlias: "express",
4135
},
36+
{
37+
name: "H3 Starter Kit",
38+
alias: "h3",
39+
hint: "A H3 application starter kit",
40+
source: "github:toneflix/arcstack",
41+
},
4242
{
4343
name: "H3 Lean Starter Kit",
4444
alias: "h3-lean",
@@ -48,3 +48,11 @@ export const templates: {
4848
baseAlias: "h3",
4949
},
5050
];
51+
52+
export const dependencyTemplates = {
53+
"@arcstack-hq/common": "^0.1.4",
54+
"@arcstack-hq/console": "^0.1.4",
55+
"@arcstack-hq/contract": "^0.1.4",
56+
"@arcstack-hq/database": "^0.1.4",
57+
"@arcstack-hq/driver-express": "^0.1.4"
58+
}

0 commit comments

Comments
 (0)