Minimal boilerplate for a single-page app using React, TypeScript with JSX support (TSX), and Visual Studio Code.
Note: Run commands from the root folder of the cloned repository.
To build the project from the command-line:
- Install Node.js
npm installnpm run build
To view the app in the browser:
npm install -g http-serverhttp-server- Open http://localhost:8080/ in your browser of choice.
To develop using Visual Studio Code:
- Install Visual Studio Code.
- Open the root folder of the cloned repository.
- The
tasks.jsonfile is configured to run the TypeScript compiler in watch mode. Press Cmd+Shift+B on Mac or Ctrl+Shift+B on Windows or Linux to start the watcher.
To instantly view changes in the browser while developing:
- Run
npm run devin a terminal. This will start bothwebpackin watch mode andhttp-server. Hint: Visual Studio Code contains a built-in terminal.