Hi. I'm just starting with SST and creating a proj...
# help
p
Hi. I'm just starting with SST and creating a project with
npm init sst
does not produce a .gitignore file. Is this intended behavior?
m
yes
p
Thx. May I ask why? If someone can point me to some previous discussion that'd be great.
t
I'm actually not sure if this is intended
m
@Frank and I had a convo about this a while ago
k
@manitej @Frank I'd also love to hear more about your reasoning to not setup a
.gitignore
file with some sane minimal defaults e.g. excluding
.env
and the
.build
and
node_modules
folders
We had quite some fun with removing credential from repositories in the past and while it's doable with some tooling to scrape those from history, preventing it from happening with a good default is preferable to my mind.
f
oh hmm.. we should fix this.. definitely should have
.gitignore
in there
@manitej i recall our conversation was about the lock file 🤔
@thdxr i just did a quick test: • running
npm init sst
does NOT generate
.gitignore
file • running
cd packages/create-sst && yarn create-sst
inside the repo DOES generate
.gitignore
Not sure what’s causing the differences. Can you take a look?
p
I noticed that if I
npm i create-sst
and go to
<package_path>/bin/presets/base/javascript/templates/
the .gitignore file is not there. However, it does appear in the GitHub repository. Hope that helps a bit.
t
that did help! basically told me that it wasn't getting shipped in the npm package
and npm has a bug around this, just shipped a workaround so latest version of create-sst will generate gitignores
p
Can confirm it's working for me now. That was rather fast :)