9oelM / react-typescript-monorepo-boilerplate

Too tired of creating all web projects from scratch again and again

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

react-typescript-monorepo-boilerplate

Too tired to create all web projects from scratch again and again

Unless you have a project that is going to be heavily dependent upon some framework (for example, you might be using Next.js), it's always the best practice NOT to use create-react-app to leave 100% of room for custom configurations. This is just the template repository for that.

The configs include the basic things I use for any of my projects. They're opinionated.

Included in the box

  • eslint (+ prettier) autofix as you save on VSCode
  • monorepo using npm v8+ workspaces
  • webpack and its configs in Typescript
  • jest config in Typescript
  • jest + enzyme
  • react + typescript + basic utils
  • storybook
  • npm
  • nvmrc (currently 16.x)

Tips

  • Don't install any packages inside packages/*. Install all modules for packages/* from the root: i.e. npm i --save-dev mymodule -w packages/app. This way, it won't create package-lock.json inside packages/app. If you simply run npm i --save-dev mymodule inside packages/app, package-lock.json will be created inside there as well, and this might confuse module resolution later.
  • This config is based on the assumption that the developer is using Visual Studio Code.

About

Too tired of creating all web projects from scratch again and again

License:MIT License


Languages

Language:TypeScript 75.8%Language:JavaScript 20.6%Language:HTML 3.6%