Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: include a .gitignore file in the copied over template from create-fuels #1613

Closed
wants to merge 6 commits into from
Closed
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions .changeset/sharp-news-juggle.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"create-fuels": patch
---

fix: include a gitignore file in the copied over files from create-fuels
3 changes: 2 additions & 1 deletion packages/create-fuels/src/cli.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import chalk from 'chalk';
import { execSync } from 'child_process';
import { Command } from 'commander';
import { existsSync } from 'fs';
import { cp, mkdir } from 'fs/promises';
import { cp, mkdir, rename } from 'fs/promises';
import { join } from 'path';
import prompts from 'prompts';

Expand Down Expand Up @@ -64,6 +64,7 @@ export const runScaffoldCli = async (
await mkdir(projectPath);

await cp(join(__dirname, '../templates/nextjs'), projectPath, { recursive: true });
await rename(join(projectPath, 'gitignore'), join(projectPath, '.gitignore'));
arboleya marked this conversation as resolved.
Show resolved Hide resolved

if (shouldInstallDeps) {
process.chdir(projectPath);
Expand Down
4 changes: 3 additions & 1 deletion templates/nextjs/.gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -34,4 +34,6 @@ yarn-error.log*
next-env.d.ts

.fuels
sway-api
src/sway-api
sway-contracts/out
.turbo
39 changes: 39 additions & 0 deletions templates/nextjs/gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
# dependencies
/node_modules
/.pnp
.pnp.js
.yarn/install-state.gz

# testing
/coverage

# next.js
/.next/
/out/

# production
/build

# misc
.DS_Store
*.pem

# debug
npm-debug.log*
yarn-debug.log*
yarn-error.log*

# local env files
.env*.local

# vercel
.vercel

# typescript
*.tsbuildinfo
next-env.d.ts

.fuels
src/sway-api
sway-contracts/out
.turbo
Loading