danieldop / bootstrap

5 stars 10 forks source link

web.sh is outdated #5

Open maxxxymum opened 3 years ago

maxxxymum commented 3 years ago

I have went trough all the steps required for FE engineer.

The last one web.sh has failed. Homebrew can't find node@8 formulae.

Currently I am not that confident in our FE stack and requirements. I think we should definitely gather requirements and update this srcipt.

maxxxymum commented 3 years ago

My proposal is to setup nvm instead of node directly.

NVM is node version manager, so developer can choose specific node version for his service. This is valuable because different services use different versions of node.

Update:

I have studied a few our frontend repos. I have found out that they are using different version on node. Specific versions are mentioned in each service Dockerfile.

Best practice is to specify node version per service in package.json or in .nvmrc file. The least one is most efficient way to switch node version with one command using nvm.

As for now my proposal is to install lts release of node by default.

maxxxymum commented 3 years ago

Global installation of npm packages is considered as bad practice. Every node based project have its own package dependencies listed in package.json. So globally installed npm could conflict with packages installed per service.

It's a good practice to keep all dependencies explicitly listed in service package.json. At our scale we have frontend services, so:

  1. They can use different versions of the same package;
  2. They can use different packages for the same purpose (jshint or eslint for linting for example);