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 buildscript uses the TypeScript compiler (tsc) as configured in thepackage.jsonfile:Compile the SCSS styles (npm run build
styles/styles.scss) into CSS (styles/styles.css): Thenpm run sass:buildscript uses the Sass compiler to process SCSS files into CSS:npm run sass:build
- Run the application:
Open the
index.htmlfile in your web browser. You can either open it directly from the file system or use a local server (e.g.,npx serveor any other HTTP server).
Notes:
- To automatically recompile TypeScript on changes:
npm run watch(usestsc --watchto 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).