A testing ground for a Danula map
- Install dependencies:
Make sure you have Node.js and npm installed. Then, run the following command in the project's root directory to install the necessary development dependencies (that is, TypeScript + the Sass compiler):
npm install
- Compile TypeScript:
Compile the TypeScript code (
scripts/nermal.ts
) into JavaScript (scripts/nermal.js
). Thenpm run build
script uses the TypeScript compiler (tsc
) as configured in thepackage.json
file:Compile the SCSS styles (npm run build
styles/styles.scss
) into CSS (styles/styles.css
): Thenpm run sass:build
script uses the Sass compiler to process SCSS files into CSS:npm run sass:build
- Run the application:
Open the
index.html
file in your web browser. You can either open it directly from the file system or use a local server (e.g.,npx serve
or any other HTTP server).
Notes:
- To automatically recompile TypeScript on changes:
npm run watch
(usestsc --watch
to monitor and recompile TypeScript files). - To automatically recompile Sass on changes:
npm run sass
(uses the Sass compiler in watch mode to monitor and recompile SCSS files).