planwithus-lib
is a JavaScript library for course requirements specification and validation in plaNwithUS.
It is written in Typescript and uses ajv, a JSON Schema validator, along with js-yaml to parse course requirements in YAML format. The use of YAML ensures that course requirements can be written in a human friendly manner.
planwithus-lib
requires Node 16. To install the required dependencies, run the following command in the root of the project directory:
npm install
To build the repository, run:
npm run build
This will call a script which runs the TypeScript compiler on the source code. Lastly, to test the code, run:
npm run coverage
In planwithus-lib
, course requirements are specified using the YAML format and validated by schemas written in JSON Schema.
For more details on the course requirement specification, please refer to the documentation for index.ts. While the specification is meant to be exhaustive, it is likely that users will not require all of these constructs to build up their course requirements. Users are recommended to learn the syntax by referring to any of the existing blocks and looking at how similar courses are implemented. For further assistance, users may also ask questions on the Discussions forum.
As with any YAML file, comments can be added to the files using the #
symbol, which will cause planwithus-lib
to ignore everything on the same line after the #
symbol.
The latest documentation of the main
branch generated by TypeDoc can be accessed at https://wei2912.github.io/planwithus-lib/index.html.
The latest test report of the main
branch generated by mochawesome can be accessed at https://wei2912.github.io/planwithus-lib/mochawesome.html.