We have prepared the base skeleton of this new project for you. You can find it in the code samples folder, under Chapter04/mediaman-v1-initial. Copy that folder and open it in your favorite editor.
Next, install the necessary dependencies using npm install.
The scripts are mostly the same as before:
- npm install will install everything you need.
- npm run tsc will compile the code.
- npm run build will generate a dist folder with the compiled version.
- npm start and npm run serve will both build and start a web server to serve the files and make them available over at http://localhost:3000.
We'll keep the same high-level code organization as we did for the last project, that is, a single folder with a single TypeScript file and a single HTML file.
At this point, you might feel that putting everything into a single TypeScript file is far from ideal and you'd be totally right. As a matter of fact, in later chapters, we will learn about modules and other features of TypeScript that will help us to modularize our code.
For now, bear with us as we want to keep our attention on generics and enums.