include gitignore
This commit is contained in:
@@ -100,6 +100,15 @@ async function main() {
|
|||||||
await fs.copy(envExamplePath, envPath);
|
await fs.copy(envExamplePath, envPath);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Rename _gitignore to .gitignore (npm excludes .gitignore by default)
|
||||||
|
const gitignoreTemplatePath = path.join(targetDir, '_gitignore');
|
||||||
|
const gitignorePath = path.join(targetDir, '.gitignore');
|
||||||
|
|
||||||
|
if (fs.existsSync(gitignoreTemplatePath)) {
|
||||||
|
spinner.text = 'Setting up .gitignore file...';
|
||||||
|
await fs.move(gitignoreTemplatePath, gitignorePath, { overwrite: true });
|
||||||
|
}
|
||||||
|
|
||||||
// Update package.json name if not current directory
|
// Update package.json name if not current directory
|
||||||
if (projectDir !== '.') {
|
if (projectDir !== '.') {
|
||||||
const packageJsonPath = path.join(targetDir, 'package.json');
|
const packageJsonPath = path.join(targetDir, 'package.json');
|
||||||
|
|||||||
4
create-agentic-app/package-lock.json
generated
4
create-agentic-app/package-lock.json
generated
@@ -1,12 +1,12 @@
|
|||||||
{
|
{
|
||||||
"name": "create-agentic-app",
|
"name": "create-agentic-app",
|
||||||
"version": "1.1.5",
|
"version": "1.1.7",
|
||||||
"lockfileVersion": 3,
|
"lockfileVersion": 3,
|
||||||
"requires": true,
|
"requires": true,
|
||||||
"packages": {
|
"packages": {
|
||||||
"": {
|
"": {
|
||||||
"name": "create-agentic-app",
|
"name": "create-agentic-app",
|
||||||
"version": "1.1.5",
|
"version": "1.1.7",
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"chalk": "^5.3.0",
|
"chalk": "^5.3.0",
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "create-agentic-app",
|
"name": "create-agentic-app",
|
||||||
"version": "1.1.5",
|
"version": "1.1.7",
|
||||||
"description": "Scaffold a new agentic AI application with Next.js, Better Auth, and AI SDK",
|
"description": "Scaffold a new agentic AI application with Next.js, Better Auth, and AI SDK",
|
||||||
"type": "module",
|
"type": "module",
|
||||||
"bin": {
|
"bin": {
|
||||||
|
|||||||
@@ -78,6 +78,17 @@ async function sync() {
|
|||||||
console.log(`${colors.cyan}📦 Copying project files...${colors.reset}`);
|
console.log(`${colors.cyan}📦 Copying project files...${colors.reset}`);
|
||||||
await copyWithExclusions(projectRoot, templateDir);
|
await copyWithExclusions(projectRoot, templateDir);
|
||||||
|
|
||||||
|
// Explicitly copy .gitignore file as _gitignore (npm excludes .gitignore by default)
|
||||||
|
console.log(`${colors.cyan}📄 Copying .gitignore as _gitignore...${colors.reset}`);
|
||||||
|
const gitignoreSrc = path.join(projectRoot, '.gitignore');
|
||||||
|
const gitignoreDest = path.join(templateDir, '_gitignore');
|
||||||
|
if (await fs.pathExists(gitignoreSrc)) {
|
||||||
|
await fs.copy(gitignoreSrc, gitignoreDest, { overwrite: true });
|
||||||
|
console.log(`${colors.green}✓${colors.reset} .gitignore copied as _gitignore`);
|
||||||
|
} else {
|
||||||
|
console.log(`${colors.yellow}⚠${colors.reset} .gitignore not found in project root`);
|
||||||
|
}
|
||||||
|
|
||||||
// Process template package.json
|
// Process template package.json
|
||||||
console.log(`${colors.cyan}⚙️ Updating template package.json...${colors.reset}`);
|
console.log(`${colors.cyan}⚙️ Updating template package.json...${colors.reset}`);
|
||||||
const templatePackageJsonPath = path.join(templateDir, 'package.json');
|
const templatePackageJsonPath = path.join(templateDir, 'package.json');
|
||||||
|
|||||||
43
create-agentic-app/template/_gitignore
Normal file
43
create-agentic-app/template/_gitignore
Normal file
@@ -0,0 +1,43 @@
|
|||||||
|
# See https://help.github.com/articles/ignoring-files/ for more about ignoring files.
|
||||||
|
|
||||||
|
# dependencies
|
||||||
|
/node_modules
|
||||||
|
/.pnp
|
||||||
|
.pnp.*
|
||||||
|
.yarn/*
|
||||||
|
!.yarn/patches
|
||||||
|
!.yarn/plugins
|
||||||
|
!.yarn/releases
|
||||||
|
!.yarn/versions
|
||||||
|
.pnpm-lock.yaml
|
||||||
|
|
||||||
|
# testing
|
||||||
|
/coverage
|
||||||
|
/.playwright-mcp
|
||||||
|
|
||||||
|
# next.js
|
||||||
|
/.next/
|
||||||
|
/out/
|
||||||
|
|
||||||
|
# production
|
||||||
|
/build
|
||||||
|
|
||||||
|
# misc
|
||||||
|
.DS_Store
|
||||||
|
*.pem
|
||||||
|
|
||||||
|
# debug
|
||||||
|
npm-debug.log*
|
||||||
|
yarn-debug.log*
|
||||||
|
yarn-error.log*
|
||||||
|
.pnpm-debug.log*
|
||||||
|
|
||||||
|
# env files (can opt-in for committing if needed)
|
||||||
|
.env*
|
||||||
|
|
||||||
|
# vercel
|
||||||
|
.vercel
|
||||||
|
|
||||||
|
# typescript
|
||||||
|
*.tsbuildinfo
|
||||||
|
next-env.d.ts
|
||||||
Reference in New Issue
Block a user