-
Notifications
You must be signed in to change notification settings - Fork 1
Home
In this wiki we only put information about development of TraceProv. For usage information please refer to the project website
Generally, for contributing to TraceProv we follow the same guidelines and procedures described in tod-commons wiki
TraceProv Java library can run Javascript code. Scripts written within TraceProv must work in all these environments:
- NodeJs
- HtmlUnit
- Rhino
For scripting we develop in Typescript version 1.7.3, a typed superset of Javascript, which transpiles to Javascript. Typescript implements EcmaScript 6 features plus adds a type system, the only thing that ES6 notably lacks. The typesystem is powerful enough to fully model complex libraries such as JQuery. The Typescript compiler can run natively on Node.js/Rhino and compiles to readable Javascript.
To develop as IDE we use Visual Studio Code (VSC), as it best supports Typescript. Don't worry, even if it is from Microsoft it works in Windows, Linux and Mac, and it's open source.
To compile in VSC:
Fire VSC and do File->Open Folder
Ctrl-Shift-B
runs for ever the compiler which watches for changes of .ts
files. If build in the editor doesn't work just compile by running
tsc
in the command prompt.
Javascript testing is done with Jasmine framework. It can be run from Maven with
To run only Javascript tests:
mvn jasmine:test
To start server for interactive development:
mvn jasmine:bdd
TracEL is a functional expression language which is a subset of Javascript ES6. TracEL parsing is done by typescript compiler running on Rhino interpreter, launching exceptions on unsupported language elements we find in <a href="https://github.com/Microsoft/TypeScript/blob/master/src/compiler/types.ts" target=_"blank"> typescript AST (Abstract Syntax Tree).