Lay out the project

Lay out the project

Let’s start out with a new directory. We’ll name it proj for now, but you can change it to whatever you want.

1
2
mkdir proj
cd proj

To start, we’re going to structure our project in the following way:

1
2
3
4
5
proj/
   +- src/
   |  +- components/
   |
   +- dist/

TypeScript files will start out in your src folder, run through the TypeScript compiler, then webpack, and end up in a bundle.js file in dist. Any components that we write will go in the src/components folder.

Let’s scaffold this out:

1
2
3
4
5
mkdir src
cd src
mkdir components
cd ..
mkdir dist
doc_TypeScript
2025-01-10 15:47:30
Comments
Leave a Comment

Please login to continue.