create-fluxstack 1.0.14 → 1.0.15
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/core/templates/create-project.ts +150 -31
- package/package.json +1 -1
|
@@ -34,15 +34,15 @@ export class ProjectCreator {
|
|
|
34
34
|
// 3. Generate package.json
|
|
35
35
|
await this.generatePackageJson()
|
|
36
36
|
|
|
37
|
-
// 4. Generate config files
|
|
37
|
+
// 4. Generate config files (including .gitignore)
|
|
38
38
|
await this.generateConfigFiles()
|
|
39
39
|
|
|
40
|
-
// 5.
|
|
41
|
-
await this.installDependencies()
|
|
42
|
-
|
|
43
|
-
// 6. Initialize git
|
|
40
|
+
// 5. Initialize git (before installing dependencies)
|
|
44
41
|
await this.initGit()
|
|
45
42
|
|
|
43
|
+
// 6. Install dependencies (last step)
|
|
44
|
+
await this.installDependencies()
|
|
45
|
+
|
|
46
46
|
console.log()
|
|
47
47
|
console.log("🎉 Project created successfully!")
|
|
48
48
|
console.log()
|
|
@@ -330,6 +330,124 @@ BUILD_OUTDIR=dist
|
|
|
330
330
|
|
|
331
331
|
await Bun.write(join(this.targetDir, ".env"), envContent)
|
|
332
332
|
|
|
333
|
+
// .gitignore
|
|
334
|
+
const gitignoreContent = `# Dependencies
|
|
335
|
+
node_modules/
|
|
336
|
+
.pnp
|
|
337
|
+
.pnp.js
|
|
338
|
+
|
|
339
|
+
# Production builds
|
|
340
|
+
/dist
|
|
341
|
+
/build
|
|
342
|
+
/.next/
|
|
343
|
+
/out/
|
|
344
|
+
|
|
345
|
+
# Environment variables
|
|
346
|
+
.env
|
|
347
|
+
.env.local
|
|
348
|
+
.env.development.local
|
|
349
|
+
.env.test.local
|
|
350
|
+
.env.production.local
|
|
351
|
+
|
|
352
|
+
# Logs
|
|
353
|
+
npm-debug.log*
|
|
354
|
+
yarn-debug.log*
|
|
355
|
+
yarn-error.log*
|
|
356
|
+
lerna-debug.log*
|
|
357
|
+
.pnpm-debug.log*
|
|
358
|
+
|
|
359
|
+
# Runtime data
|
|
360
|
+
pids
|
|
361
|
+
*.pid
|
|
362
|
+
*.seed
|
|
363
|
+
*.pid.lock
|
|
364
|
+
|
|
365
|
+
# Coverage directory used by tools like istanbul
|
|
366
|
+
coverage/
|
|
367
|
+
*.lcov
|
|
368
|
+
|
|
369
|
+
# nyc test coverage
|
|
370
|
+
.nyc_output
|
|
371
|
+
|
|
372
|
+
# Dependency directories
|
|
373
|
+
jspm_packages/
|
|
374
|
+
|
|
375
|
+
# TypeScript cache
|
|
376
|
+
*.tsbuildinfo
|
|
377
|
+
|
|
378
|
+
# Optional npm cache directory
|
|
379
|
+
.npm
|
|
380
|
+
|
|
381
|
+
# Optional eslint cache
|
|
382
|
+
.eslintcache
|
|
383
|
+
|
|
384
|
+
# Optional stylelint cache
|
|
385
|
+
.stylelintcache
|
|
386
|
+
|
|
387
|
+
# Microbundle cache
|
|
388
|
+
.rpt2_cache/
|
|
389
|
+
.rts2_cache_cjs/
|
|
390
|
+
.rts2_cache_es/
|
|
391
|
+
.rts2_cache_umd/
|
|
392
|
+
|
|
393
|
+
# Optional REPL history
|
|
394
|
+
.node_repl_history
|
|
395
|
+
|
|
396
|
+
# Output of 'npm pack'
|
|
397
|
+
*.tgz
|
|
398
|
+
|
|
399
|
+
# Yarn Integrity file
|
|
400
|
+
.yarn-integrity
|
|
401
|
+
|
|
402
|
+
# parcel-bundler cache (https://parceljs.org/)
|
|
403
|
+
.cache
|
|
404
|
+
.parcel-cache
|
|
405
|
+
|
|
406
|
+
# Next.js build output
|
|
407
|
+
.next
|
|
408
|
+
|
|
409
|
+
# Nuxt.js build / generate output
|
|
410
|
+
.nuxt
|
|
411
|
+
dist
|
|
412
|
+
|
|
413
|
+
# Storybook build outputs
|
|
414
|
+
.out
|
|
415
|
+
.storybook-out
|
|
416
|
+
|
|
417
|
+
# Temporary folders
|
|
418
|
+
tmp/
|
|
419
|
+
temp/
|
|
420
|
+
|
|
421
|
+
# Editor directories and files
|
|
422
|
+
.vscode/*
|
|
423
|
+
!.vscode/extensions.json
|
|
424
|
+
.idea
|
|
425
|
+
*.suo
|
|
426
|
+
*.ntvs*
|
|
427
|
+
*.njsproj
|
|
428
|
+
*.sln
|
|
429
|
+
*.sw?
|
|
430
|
+
|
|
431
|
+
# OS generated files
|
|
432
|
+
.DS_Store
|
|
433
|
+
.DS_Store?
|
|
434
|
+
._*
|
|
435
|
+
.Spotlight-V100
|
|
436
|
+
.Trashes
|
|
437
|
+
ehthumbs.db
|
|
438
|
+
Thumbs.db
|
|
439
|
+
|
|
440
|
+
# FluxStack specific
|
|
441
|
+
uploads/
|
|
442
|
+
public/uploads/
|
|
443
|
+
.fluxstack/
|
|
444
|
+
|
|
445
|
+
# Bun
|
|
446
|
+
bun.lockb
|
|
447
|
+
`
|
|
448
|
+
|
|
449
|
+
await Bun.write(join(this.targetDir, ".gitignore"), gitignoreContent)
|
|
450
|
+
|
|
333
451
|
// README
|
|
334
452
|
const readme = `# ${this.projectName}
|
|
335
453
|
|
|
@@ -469,31 +587,32 @@ bun.lockb
|
|
|
469
587
|
private async initGit() {
|
|
470
588
|
console.log("🔧 Initializing git repository...")
|
|
471
589
|
|
|
472
|
-
|
|
473
|
-
|
|
474
|
-
|
|
475
|
-
|
|
476
|
-
|
|
477
|
-
|
|
478
|
-
|
|
479
|
-
|
|
480
|
-
|
|
481
|
-
|
|
482
|
-
|
|
483
|
-
|
|
484
|
-
|
|
485
|
-
|
|
486
|
-
|
|
487
|
-
|
|
488
|
-
|
|
489
|
-
|
|
490
|
-
|
|
491
|
-
|
|
492
|
-
|
|
493
|
-
|
|
494
|
-
|
|
495
|
-
|
|
496
|
-
|
|
497
|
-
|
|
590
|
+
try {
|
|
591
|
+
// Initialize git repository
|
|
592
|
+
await spawn({
|
|
593
|
+
cmd: ["git", "init", "--quiet"],
|
|
594
|
+
cwd: this.targetDir,
|
|
595
|
+
stdout: "ignore",
|
|
596
|
+
stderr: "ignore"
|
|
597
|
+
}).exited
|
|
598
|
+
|
|
599
|
+
// Add all files
|
|
600
|
+
await spawn({
|
|
601
|
+
cmd: ["git", "add", "."],
|
|
602
|
+
cwd: this.targetDir,
|
|
603
|
+
stdout: "ignore",
|
|
604
|
+
stderr: "ignore"
|
|
605
|
+
}).exited
|
|
606
|
+
|
|
607
|
+
// Initial commit
|
|
608
|
+
await spawn({
|
|
609
|
+
cmd: ["git", "commit", "-m", "Initial commit - FluxStack project created", "--quiet"],
|
|
610
|
+
cwd: this.targetDir,
|
|
611
|
+
stdout: "ignore",
|
|
612
|
+
stderr: "ignore"
|
|
613
|
+
}).exited
|
|
614
|
+
} catch (error) {
|
|
615
|
+
console.warn("⚠️ Git initialization failed (git may not be installed)")
|
|
616
|
+
}
|
|
498
617
|
}
|
|
499
618
|
}
|