A typical front end project setup.
In the repository root directory:
npm install
npm run devIntended is to take the most standard tooling at the time of writing.
Webpack: Is the "runtime": It 1) serves the files onhttp://localhost:8080, but also 2) orchestrates the pipeline to transform source files to servable files.npmas 1) the CL interface and 2) to manage frontend packages (at development time): It downloads libraries and keeps track of their versions and dependencies (inpackage.jsonandpackage-lock.json).Babelis a package that contains the logic to convert from ES5+ to browser-compatible ES5.
More precisely, the dependencies in package.json:
webpackto bundle all the moduleswebpack-clito run webpack from cliwebpack-dev-serverto serve the compiled file.css-loaderto configure webpack for compiling the cssstyle-loaderloads all the css in the head of HTMLbabel-loaderto configure webpack for using babel@babel/coreto transpile the jsx to js@babel/preset-envto configure the transpiler for old browser
- Amazing "what and why" of front end development tooling.
- Tutorial about how to bootstrap a React project
- SASS for React?
- front end (implies that
JavaScriptis executed by the browser aka client-side, as opposed to server-side). - setup sums up that it is an actual project repository, but containing only the non-specific code.
- Possibly also related: boilerplate, development environment, project bootstraping.