WASL is a specification language for defining Web applications. It allows JavaScript developers to specify a JSON tree of source files and custom scripts. This then executes a program stored across the Web.
Note: WASL is a core technology of the Brains@Play Framework
WASL files inherit heavily from the package.json
file from Node.js, allowing for less duplication of work when publishing to NPM.
The specification is written in JSON Schema and validated using Ajv. Typescript types are generaged using json-schema-to-typescript.
Each version of wasl
is archived in the versions
folder of this repository.
components
and listeners
fields that declare application code files and associations with other files.{
"components": {
"first": {
"src": "first.wasl.json",
"extensions": {
"arbitrary": {
"x": 1080,
"y": 720
}
}
} ,
"second": {
"href": "https://example.com/second",
"children": {
"third": true
}
},
"third": {
"src": "./test.js"
}
},
"listeners": {
"first.component": {
"second": true
}
}
}
The libraries in this repo validate and load WASL files into JavaScript.
wasl
- Load the src
keys into a WASL file.wasl-validate
- Validation of a WASL file using JSON Schema (Ajv)wasl-run
- Minimal execution of a WASL graph loaded using wasl
src
key (anywhere in the WASL file!) to their containing objects.Errors indicate that the WASL file will not run.
Warnings indicate that there is suboptimal syntax in the files themselves. However, these are corrected to load the file and don't impact loaded object format.
Note: Use Node v16.15.0 or higher (which support import assertions for JSON files) to run the tests
This library is maintained by Garrett Flynn and Joshua Brewster, who use contract work and community contributions through Open Collective to support themselves.
Support us with a monthly donation and help us continue our activities!
Become a sponsor and get your logo here with a link to your site!