First install with: npm install
To run the project: npm run dev
To run tests: npm run test
Create a .env file at the root of the project with the following variables:
VITE_BACKEND_URL="https://ets-glitch-backend.glitch.me/"
VITE_AZURE_BACKEND_URL="https://evaluetonsavoirbackend.azurewebsites.net/"
The original code has been developed to create a VS extension to support GIFT text format.
The code can be found here: https://codesandbox.io/s/gift-templates-iny09
We decided to reuse this code because it provides a preview close to how looks like quizzes in Moodle. Which is a well-known platform at École de technologie supérieure (ÉTS).
In order to reuse the code, we had to install the following NPM packages:
- katex : A fast, easy-to-use JavaScript library for TeX math rendering on the web.
- marked : A markdown parser and compiler. Built for speed.
- nanoid : A tiny (108 bytes), secure, URL-friendly, unique string ID generator for JavaScript.
- gift-pegjs : A GIFT parser for JavaScript using PEG.js.
- @types/katex : TypeScript definitions for katex.
- @types/marked : TypeScript definitions for marked.
- @types/nanoid : TypeScript definitions for nanoid.
-
Error.ts: changed 2 let
document
andnewText
into const. (es-lint) -
GlobalFeedback.ts: removed unused import of
TextFormat
. (es-lint) -
Matching.ts: removed unused import of
Match
. (es-lint) -
TextType.ts: replaced the
marked
call bymarked.parse
and fixed SyntaxError: ambiguous indirect export: default for{ marked }
. -
Put
Template
andErrorTemplate
functions apart from index.ts to dedicated.ts
files.