mirror of
https://gitlab.com/nightlycommit/twing.git
synced 2025-01-18 08:46:50 +02:00
Resolve issue #616
This commit is contained in:
parent
0f3064d17b
commit
274050348e
35
.nycrc.json
35
.nycrc.json
@ -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
9
.odzrc.json
Normal file
@ -0,0 +1,9 @@
|
|||||||
|
{
|
||||||
|
"reporters": [
|
||||||
|
"text",
|
||||||
|
"html"
|
||||||
|
],
|
||||||
|
"sources": [
|
||||||
|
"src/main/**/*.ts"
|
||||||
|
]
|
||||||
|
}
|
@ -7,7 +7,7 @@ First-class TypeScript and JavaScript Twig compiler
|
|||||||
|
|
||||||
This projects needs at least **node.js 16.0.0** to run.
|
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
|
## 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:
|
It is even possible - and recommended - to track the coverage while writing tests:
|
||||||
|
|
||||||
```shell
|
```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:
|
Of course, it is also perfectly possible to pipe the result of the test to your favorite tap formatter:
|
||||||
|
@ -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);
|
|
||||||
};
|
|
@ -1,7 +1,8 @@
|
|||||||
{
|
{
|
||||||
"extends": "../../tsconfig.json",
|
"extends": "../../tsconfig.json",
|
||||||
"compilerOptions": {
|
"compilerOptions": {
|
||||||
"inlineSourceMap": true
|
"inlineSourceMap": true,
|
||||||
|
"inlineSources": true
|
||||||
},
|
},
|
||||||
"include": [
|
"include": [
|
||||||
"index.ts"
|
"index.ts"
|
||||||
|
Loading…
Reference in New Issue
Block a user