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.json
file. - Run
npm install
to install the development dependencies. There are only two: thetypescript
compiler andlite-server
. Both will be installed locally when you execute this command. - From a terminal either run
npx tsc -w
ornode_modules/.bin/tsc -w
to automatically watch for and compile changes in multiple typescript files in the project. - From a separate terminal run
npx lite-server
ornpm run dev
to launch the development server in your browser.