Resolve issue #615

This commit is contained in:
Eric MORAND 2024-04-16 09:33:14 +02:00
parent ec4a05cbbc
commit 2e48d48966
1004 changed files with 216 additions and 211 deletions

6
.gitignore vendored
View File

@ -1,9 +1,3 @@
.nyc_output
dist
coverage
docs/.bundle
docs/_site
docs/vendor
node_modules
package-lock.json
tmp

View File

@ -29,7 +29,7 @@
"html"
],
"include": [
"**/src/**"
"**/main/**"
],
"exclude": []
}

View File

@ -39,22 +39,22 @@ npm run test:browser
### Writing and executing tests
Assuming one want to execute the test located in `test/tests/integration/comparison/to-array.ts`, one would run:
Assuming one want to execute the test located in `src/test/tests/integration/comparison/to-array.ts`, one would run:
```shell
ts-node test/tests/integration/comparison/to-array.ts
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 test/tests/integration/comparison/to-array.ts
nyc 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:
```shell
test/tests/integration/comparison$ ts-node . | tap-nyan
src/test/tests/integration/comparison$ ts-node . | tap-nyan
9 -_-_-_-_-_,------,
0 -_-_-_-_-_| /\_/\
0 -_-_-_-_-^|__( ^ .^)

View File

@ -34,9 +34,9 @@
"test": "node dist/test",
"test:browser": "browserify dist/test/index.js | tape-run --sandbox=false",
"build": "npm run build:cjs && npm run build:types && npm run bundle",
"build:cjs": "rimraf dist/cjs && tsc --project . --module commonjs --outDir dist/cjs",
"build:test": "rimraf dist && tsc --project test --outDir dist",
"build:types": "rimraf dist/types && tsc --project . --declaration true --emitDeclarationOnly true --outDir dist/types",
"build:cjs": "rimraf dist/cjs && tsc --project src/main --module commonjs --outDir dist/cjs",
"build:test": "rimraf dist && tsc --project src/test --outDir dist",
"build:types": "rimraf dist/types && tsc --project src/main --declaration true --emitDeclarationOnly true --outDir dist/types",
"bundle": "browserify dist/cjs/lib.js -g uglifyify -s Twing -o dist/lib.min.js"
},
"dependencies": {

View File

@ -265,7 +265,7 @@ export {createWithTagHandler} from "./lib/tag-handler/with";
export type {
TwingCallable, TwingCallableArgument, TwingCallableWrapperOptions, TwingCallableWrapper
} from "./lib/callable-wrapper";
export type {TwingContext} from "./lib/context";
export {type TwingContext, createContext} from "./lib/context";
export type {TwingEnvironment, TwingEnvironmentOptions, TwingNumberFormat} from "./lib/environment";
export type {
TwingEscapingStrategy, TwingEscapingStrategyHandler, TwingEscapingStrategyResolver
@ -280,7 +280,7 @@ export type {TwingNodeVisitor} from "./lib/node-visitor";
export type {
TwingOperator, TwingOperatorAssociativity, TwingOperatorType, TwingOperatorExpressionFactory
} from "./lib/operator";
export type {TwingOutputBuffer} from "./lib/output-buffer";
export {type TwingOutputBuffer, createOutputBuffer} from "./lib/output-buffer";
export type {TwingParser, TwingParserOptions} from "./lib/parser";
export type {TwingSandboxSecurityPolicy} from "./lib/sandbox/security-policy";
export type {TwingSource} from "./lib/source";

Some files were not shown because too many files have changed in this diff Show More