Skip to content

Latest commit

 

History

History
19 lines (14 loc) · 2.05 KB

File metadata and controls

19 lines (14 loc) · 2.05 KB

Toolchains

As web programming becomes more and more complex it became necessary to abstract away some of that complexity with a series of tools. Some common functional pieces in a web application tool chain include:

  • Code repository - Stores code in a shared, versioned location.
  • Linter - Removes, or warns of, non-idiomatic code usage.
  • Prettier - Formats code according to a shared standard.
  • Transpiler - Compiles code into a different format. For example, from JSX to JavaScript, TypeScript to JavaScript, or SCSS to CSS.
  • Polyfill - Generates backward compatible code for supporting old browser versions that do not support the latest standards.
  • Bundler - Packages code into bundles for delivery to the browser. This enables compatibility (for example with ES6 module support), or performance (with lazy loading).
  • Minifier - Removes whitespace and renames variables in order to make code smaller and more efficient to deploy.
  • Testing - Automated tests at multiple levels to ensure correctness.
  • Deployment - Automated packaging and delivery of code from the development environment to the production environment.

The toolchain that we use for our React project consists of GitHub as the code repository, Vite for JSX, TS, development and debugging support, ESBuild for converting to ES6 modules and transpiling (with Babel underneath), Rollup for bundling and tree shaking, PostCSS for CSS transpiling, and finally a simple bash script (deployReact.sh) for deployment.

You don't have to fully understand what each of these pieces in the chain are accomplishing, but the more you know about them the more you can optimize your development efforts.

In the following instruction we will show you how to use Vite to create a simple web application using the tools mentioned above. We will then demonstrate how to convert your startup into a modern web application by converting Simon to use Vite and React.