forked from github-mirror/twing
Merge branch 'issue-616' into 'milestone/7.0.0'
Resolve issue #616 See merge request nightlycommit/twing!609
This commit is contained in:
commit
ef0f2897ec
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.
|
||||
|
||||
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:
|
||||
|
@ -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",
|
||||
"compilerOptions": {
|
||||
"inlineSourceMap": true
|
||||
"inlineSourceMap": true,
|
||||
"inlineSources": true
|
||||
},
|
||||
"include": [
|
||||
"index.ts"
|
||||
|
Loading…
Reference in New Issue
Block a user