Skip to content

Latest commit

 

History

History
43 lines (27 loc) · 1.25 KB

File metadata and controls

43 lines (27 loc) · 1.25 KB

fedramp-automation Javascript usage example

This is a simple example of how to use the fedramp-automation validation rules with SaxonJS.

SaxonJS is available in two forms:

This example utilizes the node.js version. Usage in the browser is similar, with some subtle differences. The fedramp-automation web code base may be referenced as an example, in Typescript, that will run in both node.js and the browser. See: ../../web

Prerequisites

Compiled Schematron XSLT artifacts are required to run this example. The following command will build the artifact:

cd ../../..
make build-validations

Usage

To get a bash prompt within the container, run:

docker-compose run example bash -l

You may now run and interact with the example code.

Developer notes

To run tests, build the required Schematron XSLT to sef.json files and run the test script:

docker-compose run example npm run ./test.sh

To auto-format code:

docker-compose run example npm format