Adds tsconfig-replace-paths

pull/91/head
Steve Ruiz 2021-09-14 08:51:24 +01:00
rodzic 95518f6bc1
commit 56f327d4f9
8 zmienionych plików z 611 dodań i 614 usunięć

Wyświetl plik

@ -23,8 +23,8 @@
"start": "node scripts/dev & yarn types:dev",
"build": "node scripts/build && yarn types:build",
"types:pre": "tsc",
"types:dev": "tsc --watch",
"types:build": "tsc --project tsconfig.build.json",
"types:dev": "tsc -w",
"types:build": "tsc -p tsconfig.build.json && tsconfig-replace-paths -p tsconfig.build.json",
"lint": "eslint src/ --ext .ts,.tsx",
"clean": "rm -rf dist",
"ts-node": "ts-node",
@ -34,6 +34,7 @@
"devDependencies": {
"@babel/core": "^7.15.5",
"@babel/preset-env": "^7.15.4",
"@herbcaudill/tscpaths": "^0.0.17",
"@types/jest": "^27.0.1",
"@types/node": "^16.7.10",
"@types/react": "^17.0.16",
@ -46,6 +47,7 @@
"react": "^17.0.2",
"react-dom": "^17.0.2",
"ts-node": "^10.2.1",
"tsconfig-replace-paths": "^0.0.5",
"tslib": "^2.3.1",
"typedoc": "^0.22.3",
"typescript": "^4.4.2"
@ -60,4 +62,4 @@
"@use-gesture/react": "^10.0.0-beta.24"
},
"gitHead": "5cb031ddc264846ec6732d7179511cddea8ef034"
}
}

Wyświetl plik

@ -1,9 +0,0 @@
import * as React from 'react'
import { renderWithSvg } from '+test'
import { Defs } from './defs'
describe('defs', () => {
test('mounts component without crashing', () => {
renderWithSvg(<Defs zoom={1} />)
})
})

Wyświetl plik

@ -1,22 +0,0 @@
import * as React from 'react'
interface DefProps {
zoom: number
}
export function Defs({ zoom }: DefProps): JSX.Element {
return (
<defs>
<circle id="dot" className="tl-counter-scaled tl-dot" r={4} />
<circle id="handle-bg" className="tl-handle-bg" pointerEvents="all" r={12} />
<circle id="handle" className="tl-counter-scaled tl-handle" pointerEvents="none" r={4} />
<g id="cross" className="tl-anchor-indicator">
<line x1={-6} y1={-6} x2={6} y2={6} />
<line x1={6} y1={-6} x2={-6} y2={6} />
</g>
<filter id="expand">
<feMorphology operator="dilate" radius={0.5 / zoom} />
</filter>
</defs>
)
}

Wyświetl plik

@ -1 +0,0 @@
export * from './defs'

Wyświetl plik

@ -15,7 +15,12 @@
"incremental": false,
"declarationMap": true,
"sourceMap": true,
"emitDeclarationOnly": true
"emitDeclarationOnly": true,
"paths": {
"+*": ["./*"],
"@tldraw/vec": ["../vec"],
"@tldraw/intersect": ["../intersect"]
}
},
"references": [{ "path": "../vec" }, { "path": "../intersect" }]
}

Wyświetl plik

@ -23,8 +23,8 @@
"start": "node scripts/dev & yarn types:dev",
"build": "node scripts/build && yarn types:build",
"types:pre": "tsc",
"types:dev": "tsc --watch",
"types:build": "tsc --project tsconfig.build.json",
"types:dev": "tsc -w",
"types:build": "tsc -p tsconfig.build.json && tsconfig-replace-paths -p tsconfig.build.json",
"lint": "eslint src/ --ext .ts,.tsx",
"clean": "rm -rf dist",
"ts-node": "ts-node",
@ -46,6 +46,7 @@
"react": "^17.0.2",
"react-dom": "^17.0.2",
"ts-node": "^10.2.1",
"tsconfig-replace-paths": "^0.0.5",
"tslib": "^2.3.1",
"typedoc": "^0.22.3",
"typescript": "^4.4.2"
@ -72,4 +73,4 @@
"rko": "^0.5.25"
},
"gitHead": "5cb031ddc264846ec6732d7179511cddea8ef034"
}
}

Wyświetl plik

@ -1,12 +1,10 @@
{
"compilerOptions": {
// For references
"declaration": true,
"declarationMap": true,
"composite": true,
"sourceMap": true,
"emitDeclarationOnly": true,
// Other
"allowSyntheticDefaultImports": true,
"esModuleInterop": true,
"experimentalDecorators": true,
@ -18,15 +16,15 @@
"lib": ["dom", "esnext"],
"module": "esnext",
"moduleResolution": "node",
"noFallthroughCasesInSwitch": true /* Report errors for fallthrough cases in switch statement. */,
"noImplicitAny": true /* Raise error on expressions and declarations with an implied 'any' type. */,
"noImplicitReturns": true /* Report error when not all code paths in function return a value. */,
"noUnusedLocals": false /* Report errors on unused locals. */,
"noUnusedParameters": false /* Report errors on unused parameters. */,
"noFallthroughCasesInSwitch": true,
"noImplicitAny": true,
"noImplicitReturns": true,
"noUnusedLocals": false,
"noUnusedParameters": false,
"skipLibCheck": true,
"strict": true,
"strictFunctionTypes": true /* Enable strict checking of function types. */,
"strictNullChecks": true /* Enable strict null checks. */,
"strictFunctionTypes": true,
"strictNullChecks": true,
"stripInternal": true,
"target": "es6",
"typeRoots": ["node_modules/@types", "node_modules/jest"],

1155
yarn.lock

Plik diff jest za duży Load Diff