A Typescript Document Object Model (DOM) Crash Course
The code in this repository is based on the following four part video tutorial which goes through a Javascript DOM Crash Course. The only difference is here I decide to follow through using typescript instead.
Each individual part is treated as a separate node project. To execute the code in the src directory do the following:
- Navigate to the root-level folder of a part containing a package.jsonfile.
- Run npm installto install the development dependencies. There are only two: thetypescriptcompiler andlite-server. Both will be installed locally when you execute this command.
- From a terminal either run npx tsc -wornode_modules/.bin/tsc -wto automatically watch for and compile changes in multiple typescript files in the project.
- From a separate terminal run npx lite-serverornpm run devto launch the development server in your browser.