Open codingwithmanny opened 4 months ago
Hey @codingwithmanny @tmm, may I be assigned this issue?
@codingwithmanny is the issue assigned to somebody already?
Hi @FaybianB and @dicethedev just need @jxom or @tmm to assign it.
I wish I was a maintainer on this repo, but just a contributor 😂
Hi @FaybianB and @dicethedev just need @jxom or @tmm to assign it.
I wish I was a maintainer on this repo, but just a contributor 😂
No problem
First PR wins.
Missing
.gitignore
when creating a new project.
I made a PR - https://github.com/wevm/vocs/pull/111
Well, I lost the PR race (nice quickness @dicethedev) but I still would like to submit a solution. It seems like init.ts
is copying all of the contents of the templates/default
directory to the user's project except .gitignore
. I think either copySync
is ignoring hidden files or the hidden file is being removed immediately after.
However, I haven't gotten init.ts
to reflect any of my changes to the file to test my theory. Any suggestions @jxom @tmm? I've ran the build after my changes via pnpm build
and still nothing.
Hey @FaybianB, not sure if this will help but the way I was testing it to try and figure out was trying was running the script directory in the create-vocs
folder.
# FROM: ./
pnpm build;
cd ./create-vocs;
Then run the built binary in the newly created _lib
# FROM: ./create-vocs
# Modify permissions
chmod +x ./_lib/bin.js;
# Run binary
./_lib/bin.js;
# [Expected Output]:
# ┌ Welcome to Vocs!
# │
# ◇ Enter the name of your project
# │ tmp
# │
# ◆ Project successfully scaffolded in /path/to/vocs/create-vocs/tmp!
# │
# │ Next steps:
# │
# ◇ 1. cd ./tmp - Navigate to project
# │
# ◇ 2. npm install - Install dependencies
# │
# ◇ 3. npm run dev - Start dev server
# │
# ◇ 4. Head to http://localhost:5173
# │
# └ Happy documenting! 📝
This will create that new tmp
folder, but as you can see it showing the .gitignore
which is where I left off 🤷
# FROM: ./create-vocs
tree tmp -a;
# [Expected Output]:
# tmp
# ├── .gitignore <------ HUH????
# ├── README.md
# ├── docs
# │ └── pages
# │ ├── example.mdx
# │ ├── getting-started.mdx
# │ └── index.mdx
# ├── package.json
# ├── tsconfig.json
# └── vocs.config.ts
Missing
.gitignore
when creating a new project.I made a PR - #111
How did you test that this worked?
@codingwithmanny You know, following your testing method works for me and I too see the .gitignore
file present in the tree lol. I'm not sure where to go from here either, actually.
@FaybianB it's something to do with the bundling that goes to npm packages.
If you create a new folder and install create-vocs
you can see it.
mkdir test-create-vocs;
cd test-create-vocs;
pnpm init;
pnpm add create-vocs;
Then tree the directory and you'll see that the .gitignore
isn't present:
# FROM: test-create-vocs;
tree node_modules/create-vocs/templates/default -a;
# [Expected Output]:
# node_modules/create-vocs/templates/default
# ├── README.md
# ├── docs
# │ └── pages
# │ ├── example.mdx
# │ ├── getting-started.mdx
# │ └── index.mdx
# ├── package.json
# ├── tsconfig.json
# └── vocs.config.ts
I suspect it has to do with a script in the ./scripts
folder.
Hopefully that would help with a direction.
Ended up figuring it out @FaybianB see PR
@codingwithmanny I was figuring out the fix, but just saw that you've already made a PR. Happy to see a solution.
Context
Missing
.gitignore
when creating a new project.Steps To Reproduce
Then take a look at the full directory.
Solution
Include the
.gitignore
with./create-vocs/templates/default/.gitignore