I generally end up using npm init and npx on a daily basis to accomplish a lot of scaffolding for the many small projects I make.
The command I use most often:
npm init -y
I set up my global .npmrc with personal defaults so I can init a project like this with a single command rather than going through the interactive prompt
git init
I always end up creating a repo on GitHub and then copy/pasting the git remote/git push commands... always annoys me
npx gitignore node
Pulls down a Node.js .gitignore from the GitHub-maintained .gitginore repo
Sets up a Code of Conduct (specifically, the contributor covenant) and sets my email address as the point of contact
npx license mit > LICENSE
Spits out the text of the MIT license (which I have defined as a default license in my global .npmrc) and moves that output to a file called LICENSE
I've discovered this is important to be inclusive to people who work at bigger companies. I had a friend at Google that wanted to submit a PR to a project but decided not to because I didn't have an explicit LICENSE file with the license text.
I generally end up using
npm init
andnpx
on a daily basis to accomplish a lot of scaffolding for the many small projects I make.The command I use most often:
npm init -y
.npmrc
with personal defaults so I can init a project like this with a single command rather than going through the interactive promptgit init
npx gitignore node
.gitignore
from the GitHub-maintained .gitginore reponpx covgen hello@bnb.im
npx license mit > LICENSE
.npmrc
) and moves that output to a file called LICENSELICENSE
file with the license text.this is the way