Merge branch 'issue-616' into 'milestone/7.0.0'

Resolve issue #616

See merge request nightlycommit/twing!609
This commit is contained in:
Eric MORAND 2024-07-25 08:08:38 +00:00
commit ef0f2897ec
5 changed files with 13 additions and 64 deletions

View File

@ -1,35 +0,0 @@
{
"all": true,
"lines": 100,
"branches": 100,
"functions": 100,
"watermarks": {
"lines": [
100,
100
],
"functions": [
100,
100
],
"branches": [
100,
100
],
"statements": [
100,
100
]
},
"extension": [
".ts"
],
"reporter": [
"text-summary",
"html"
],
"include": [
"**/main/**"
],
"exclude": []
}

9
.odzrc.json Normal file
View File

@ -0,0 +1,9 @@
{
"reporters": [
"text",
"html"
],
"sources": [
"src/main/**/*.ts"
]
}

View File

@ -7,7 +7,7 @@ First-class TypeScript and JavaScript Twig compiler
This projects needs at least **node.js 16.0.0** to run.
It is also strongly recommended to have [ts-node](https://www.npmjs.com/package/ts-node) and [nyc](https://www.npmjs.com/package/nyc) installed globally to ease the writing of tests and the tracking of the code coverage.
It is also strongly recommended to have [ts-node](https://www.npmjs.com/package/ts-node) and [One Double Zero](https://www.npmjs.com/package/one-double-zero) installed globally to ease the writing of tests and the tracking of the code coverage.
## Usage
@ -48,7 +48,7 @@ ts-node src/test/tests/integration/comparison/to-array.ts
It is even possible - and recommended - to track the coverage while writing tests:
```shell
nyc ts-node src/test/tests/integration/comparison/to-array.ts
odz ts-node src/test/tests/integration/comparison/to-array.ts
```
Of course, it is also perfectly possible to pipe the result of the test to your favorite tap formatter:

View File

@ -1,26 +0,0 @@
import {createBaseNode, type TwingBaseNode} from "../node";
import type {TwingConstantNode} from "./expression/constant";
export interface TwingUseNode extends TwingBaseNode<"use", {}, {
template: TwingConstantNode;
targets: TwingBaseNode<null, {}, Record<string, TwingBaseNode<null, {
alias: string | null;
}, {
block: TwingBaseNode
}>>>;
}> {
}
export const createUseNode = (
template: TwingUseNode["children"]["template"],
targets: TwingUseNode["children"]["targets"],
line: number,
column: number,
tag: string
) => {
return createBaseNode("use", {}, {
template,
targets
}, line, column, tag);
};

View File

@ -1,7 +1,8 @@
{
"extends": "../../tsconfig.json",
"compilerOptions": {
"inlineSourceMap": true
"inlineSourceMap": true,
"inlineSources": true
},
"include": [
"index.ts"