DEV Community

loading...

How do you prefer to create a new project?

patarapolw profile image Pacharapol Withayasakpunt ・1 min read
  • From scratch?
  • Bootstrapping?
  • Clone a Git or Git template? (I would recommend to add --depth=1 or use degit.)

If you choose "from scratch", what do you often do first thing first? What about other options?

From scratch

Actually, I often do from scratch, by

yarn init -y
yarn add typescript prettier -D
yarn tsc init
Enter fullscreen mode Exit fullscreen mode

Then, check most of the eslint'ty options in tsconfig.json, as well as experimentalDecorators.

Yeah, it's the very benefit of TypeScript for me, actually.

Creating .prettierrc is even optional for me.

I also used to do npx eslint --init, but that will also need syzer -u.

Bootstrapping

yarn create nuxt-app $NAME
cd $NAME
npx syzer -u
yarn
Enter fullscreen mode Exit fullscreen mode

Then check for broken dependencies.

I think syzer (maybe also npm-check-updates) is a very good package. Keeping updated will help fix security problems.

Discussion (7)

pic
Editor guide
Collapse
andrewbaisden profile image
Andrew Baisden

I prefer to do it from scratch as its much cleaner.

Collapse
souk profile image
Souk

That's what I do. How do you do to stay focus from start to finish ?

Collapse
andrewbaisden profile image
Andrew Baisden

I listen to music while I am programming.

Thread Thread
souk profile image
Souk

And other ideas that popped up along the way?

Thread Thread
andrewbaisden profile image
Andrew Baisden

Well yes music is stimulating it is not a distraction for me.

Collapse
pontakornth profile image
pontakornth

I usually use yarn create or dedicated CLI. I believe that creating project should take less time so I can focus on the project, not the configuration.

I use Vite, Vue CLI, create-react-app, preact-cli to create projects.

Collapse
mzaini30 profile image
Zen

I create npm package for my bootstrap project. So, I download my template with:

npm init svelte-zen
Enter fullscreen mode Exit fullscreen mode