Setup the development environment
Quickly setup your development environment
For the rest of the tutorial we'll be using Typescript.
If you haven't had a chance to work with Typescript, don't worry, the only major difference in our case is that we will use .ts
extension instead of .js
and .tsx
instead of .jsx
We'll be using parcel to bundle our typescript code.
1- Create a directory for the app and cd into it :
2- Create a package.json
3- Add a .gitignore file to ignore temporary files and dependencies
4- Install parcel-bundler as a development dependency (and prettier & typescript OPTIONAL)
5- Create a src/ folder in which our source code will belong
6- Inside src/ create a minimal index.html file
7- Inside src/ create an initial index.tsx
file
8- Add a dev
script to your package.json that runs parcel with hot-reloading
9- Make sure everything is working.
Our development environment is now ready on localhost:1234
🎉
Last updated