create-einja-app 0.2.1 → 0.2.2
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/README.md +8 -1
- package/dist/cli.js +23 -2
- package/dist/cli.js.map +1 -1
- package/package.json +1 -1
- package/templates/default/.env.development +25 -0
- package/templates/default/.env.local +24 -0
- package/templates/default/.env.production +25 -0
- package/templates/default/.env.staging +25 -0
- package/templates/default/.github/dependabot.yml +63 -0
- package/templates/default/.github/workflows/ci.yml +52 -0
- package/templates/default/.github/workflows/claude.yml +38 -0
- package/templates/default/.husky/_/applypatch-msg +2 -0
- package/templates/default/.husky/_/commit-msg +2 -0
- package/templates/default/.husky/_/gitignore +1 -0
- package/templates/default/.husky/_/h +22 -0
- package/templates/default/.husky/_/husky.sh +9 -0
- package/templates/default/.husky/_/post-applypatch +2 -0
- package/templates/default/.husky/_/post-checkout +2 -0
- package/templates/default/.husky/_/post-commit +2 -0
- package/templates/default/.husky/_/post-merge +2 -0
- package/templates/default/.husky/_/post-rewrite +2 -0
- package/templates/default/.husky/_/pre-applypatch +2 -0
- package/templates/default/.husky/_/pre-auto-gc +2 -0
- package/templates/default/.husky/_/pre-commit +2 -0
- package/templates/default/.husky/_/pre-merge-commit +2 -0
- package/templates/default/.husky/_/pre-push +2 -0
- package/templates/default/.husky/_/pre-rebase +2 -0
- package/templates/default/.husky/_/prepare-commit-msg +2 -0
- package/templates/default/.serena/gitignore +1 -0
- package/templates/default/.serena/project.yml +84 -0
- package/templates/default/gitignore +86 -0
- package/templates/default/package.json +1 -1
- package/templates/default/worktree.config.json +14 -0
- package/templates/default/.templateignore +0 -60
package/README.md
CHANGED
|
@@ -208,6 +208,9 @@ my-project/
|
|
|
208
208
|
# プロジェクトディレクトリに移動
|
|
209
209
|
cd my-project
|
|
210
210
|
|
|
211
|
+
# 環境変数を設定(重要!)
|
|
212
|
+
pnpm env:update
|
|
213
|
+
|
|
211
214
|
# PostgreSQLを起動
|
|
212
215
|
docker-compose up -d postgres
|
|
213
216
|
|
|
@@ -215,7 +218,11 @@ docker-compose up -d postgres
|
|
|
215
218
|
pnpm dev
|
|
216
219
|
```
|
|
217
220
|
|
|
218
|
-
|
|
221
|
+
> ⚠️ **重要**: テンプレートにはサンプルの環境変数ファイルが含まれています。
|
|
222
|
+
> `pnpm env:update` を実行して、自分のプロジェクト用に環境変数を再設定してください。
|
|
223
|
+
|
|
224
|
+
開発サーバーが起動したら、ターミナルに表示されるURLにアクセスしてください。
|
|
225
|
+
(ポート番号はワークツリーのブランチ名から自動計算されます)
|
|
219
226
|
|
|
220
227
|
---
|
|
221
228
|
|
package/dist/cli.js
CHANGED
|
@@ -302,6 +302,21 @@ function renameTemplateFiles(targetPath) {
|
|
|
302
302
|
removeSync(file);
|
|
303
303
|
}
|
|
304
304
|
}
|
|
305
|
+
function renameSpecialFiles(targetPath) {
|
|
306
|
+
const gitignoreFiles = glob.sync("**/gitignore", {
|
|
307
|
+
cwd: targetPath,
|
|
308
|
+
absolute: true,
|
|
309
|
+
dot: true
|
|
310
|
+
});
|
|
311
|
+
for (const file of gitignoreFiles) {
|
|
312
|
+
const dir = dirname2(file);
|
|
313
|
+
const newPath = join2(dir, ".gitignore");
|
|
314
|
+
if (existsSync2(file)) {
|
|
315
|
+
copySync(file, newPath);
|
|
316
|
+
removeSync(file);
|
|
317
|
+
}
|
|
318
|
+
}
|
|
319
|
+
}
|
|
305
320
|
function excludeAuthFiles(targetPath, authMethod) {
|
|
306
321
|
const excludePatterns = getAuthExcludePatterns(authMethod);
|
|
307
322
|
if (excludePatterns.length === 0) {
|
|
@@ -338,7 +353,7 @@ async function generateTemplate(config, targetPath) {
|
|
|
338
353
|
"dist",
|
|
339
354
|
"logs",
|
|
340
355
|
".env",
|
|
341
|
-
|
|
356
|
+
// フェイルセーフ(暗号化キーファイル)
|
|
342
357
|
".DS_Store",
|
|
343
358
|
"Thumbs.db",
|
|
344
359
|
"coverage"
|
|
@@ -356,6 +371,7 @@ async function generateTemplate(config, targetPath) {
|
|
|
356
371
|
});
|
|
357
372
|
excludeAuthFiles(targetPath, config.authMethod);
|
|
358
373
|
renameTemplateFiles(targetPath);
|
|
374
|
+
renameSpecialFiles(targetPath);
|
|
359
375
|
info("\u30D7\u30EC\u30FC\u30B9\u30DB\u30EB\u30C0\u30FC\u5909\u6570\u3092\u7F6E\u63DB\u4E2D...");
|
|
360
376
|
const variables = {
|
|
361
377
|
projectName: config.projectName,
|
|
@@ -420,10 +436,15 @@ function printCompletionMessage(config) {
|
|
|
420
436
|
console.log(chalk2.bold("\u6B21\u306E\u30B9\u30C6\u30C3\u30D7:"));
|
|
421
437
|
console.log();
|
|
422
438
|
console.log(chalk2.cyan(` cd ${config.projectName}`));
|
|
439
|
+
console.log(chalk2.cyan(" pnpm env:update # \u74B0\u5883\u5909\u6570\u3092\u8A2D\u5B9A"));
|
|
423
440
|
console.log(chalk2.cyan(" docker-compose up -d postgres"));
|
|
424
441
|
console.log(chalk2.cyan(" pnpm dev"));
|
|
425
442
|
console.log();
|
|
426
|
-
console.log(chalk2.gray("\u958B\u767A\u30B5\u30FC\u30D0\u30FC:
|
|
443
|
+
console.log(chalk2.gray("\u958B\u767A\u30B5\u30FC\u30D0\u30FC: \u30BF\u30FC\u30DF\u30CA\u30EB\u306B\u8868\u793A\u3055\u308C\u308BURL\u3092\u78BA\u8A8D"));
|
|
444
|
+
console.log();
|
|
445
|
+
console.log(
|
|
446
|
+
chalk2.yellow("\u26A0 \u91CD\u8981: ") + chalk2.gray("pnpm env:update \u3067\u74B0\u5883\u5909\u6570\u3092\u81EA\u5206\u306E\u30D7\u30ED\u30B8\u30A7\u30AF\u30C8\u7528\u306B\u518D\u8A2D\u5B9A\u3057\u3066\u304F\u3060\u3055\u3044")
|
|
447
|
+
);
|
|
427
448
|
console.log();
|
|
428
449
|
console.log(chalk2.gray("\u8A73\u7D30\u306F README.md \u3092\u3054\u78BA\u8A8D\u304F\u3060\u3055\u3044\u3002"));
|
|
429
450
|
console.log();
|