1.0.13 • Published 2 years ago

spiral-dom v1.0.13

Weekly downloads
-
License
ISC
Repository
github
Last release
2 years ago

Spiral

DSL based eCRF

Install

Clone the repository from github:

> git clone https://github.com/invarture-arone/Spiral.git
> cd Spiral
> npm install

On windows, npm scripts use git bash. Install git (here) and configure default npm shell as follows:

PS> npm config set script-shell "C:\\Program Files\\git\\bin\\bash.exe"

or (depending on the OS version):

PS> npm config set script-shell "C:\\Program Files (x86)\\git\\bin\\bash.exe"

Scripts

scriptdescription
npm run -s bundlebuild a javascript ES6 bundle: spiral.bundle.js
npm run -s docbuild HTML documentation in docs subfolder
npm run -s lintexecute linter on source files, don't fix
npm run -s testrun all unit tests

Unit tests

Tests are implemented using tape library (see tape on Github). For convenience the extension module test-extension can be imported, it provides helper methods. For example :

import test from "tape";
import "../test-extension";

const fruits = ["banana", "orange", "strawberry", "apple"];

test("fruits contains apple and orange", t => {
  t.arrayContains(fruits, ["apple", "orange"]);
  t.end();
});

note: don't forget to use t.end() to properly end tests. This is a general rule, not only for the extension.

VSCode integration

Debugging tape tests needs extra configuration in VSCode. The .vscode\launch.json has been added to the repository. When new configurations are added, they must be independent of the local machine; for instance, you have to use the vscode variables.

Rules precedence

To ensure that rules don't provoke conflicts between each other and that they'll be executed in the correct order, they have a fixed precedence. The higher the precedence number, the earlier the rule will be applied in the answers validation. The actual precedence is as follow :

PrecedenceRule
100ComputedRule
70RequiredRule
50ActivationRule
10DecimalPrecisionRule
10FixedLengthRule
10InRangeRule
10MaxLengthRule
10LetterCaseRule
1.0.13

2 years ago

1.0.11

2 years ago

1.0.10

2 years ago

1.0.9

2 years ago

1.0.8

2 years ago

1.0.7

2 years ago

1.0.6

2 years ago

1.0.5

2 years ago

1.0.4

2 years ago

1.0.3

2 years ago

1.0.2

2 years ago

1.0.1

2 years ago

1.0.0

2 years ago