build(all): TypeScript project references
MODIFY
.gitignore
.gitignore
@@ -27,6 +27,7 @@ doc
coverage
tmp
package-lock.json
+tsconfig.tsbuildinfo
*.tgz
# --------------------------------------------------

MODIFY
package.json
package.json
"version": "2.3.1",
"description": "Reactive Node APIs made easy",
"scripts": {
- "build": "yarn clean && lerna run build",
+ "build": "lerna run build",
"postbuild": "rimraf packages/**/*.spec.js packages/**/*.spec.d.ts",
"benchmark": "make -C benchmarks",
"watch": "lerna run --parallel --stream watch",
"test:unit": "SCOPE=unit ./scripts/run-tests.sh",
"test:watch": "SCOPE=watch ./scripts/run-tests.sh",
"test:integration": "SCOPE=integration ./scripts/run-tests.sh",
- "clean": "lerna run clean",
+ "clean": "lerna run clean && rimraf packages/*/tsconfig.tsbuildinfo",
"purge": "yarn clean && rimraf node_modules",
"prepublishOnly": "yarn clean && yarn build && yarn test",
"publish": "lerna publish --no-push --force-publish=*",

MODIFY
packages/@integration/tsconfig.json
packages/@integration/tsconfig.json
"strict": true,
"target": "es6",
"outDir": "./dist/",
+ "rootDir": "./src",
"typeRoots": [
"node_modules/@types",
"../node_modules/@types"
"include": [
"node_modules/@types",
"src/**/*.ts"
+ ],
+ "references": [
+ { "path": "../core" },
+ { "path": "../messaging" },
+ { "path": "../websockets" },
+ { "path": "../middleware-body" },
+ { "path": "../middleware-cors" },
+ { "path": "../middleware-io" },
+ { "path": "../middleware-jwt" },
+ { "path": "../middleware-joi" },
+ { "path": "../middleware-logger" },
+ { "path": "../middleware-multipart" },
]
}

MODIFY
packages/core/tsconfig.json
packages/core/tsconfig.json
{
"extends": "../../tsconfig.json",
"compilerOptions": {
- "outDir": "./dist/"
+ "outDir": "./dist/",
+ "rootDir": "./src"
},
"include": ["src/**/*.ts"]
}

MODIFY
packages/messaging/tsconfig.json
packages/messaging/tsconfig.json
"extends": "../../tsconfig.json",
"compilerOptions": {
"outDir": "./dist/",
- "declaration": true,
- "typeRoots": ["../../node_modules/@types"]
+ "rootDir": "./src"
},
- "include": ["src/**/*.ts"]
+ "include": ["src/**/*.ts"],
+ "references": [
+ { "path": "../core" }
+ ]
}

MODIFY
packages/middleware-body/tsconfig.json
packages/middleware-body/tsconfig.json
"extends": "../../tsconfig.json",
"compilerOptions": {
"outDir": "./dist/",
+ "rootDir": "./src"
},
"include": ["src/**/*.ts"],
+ "references": [
+ { "path": "../core" }
+ ]
}

MODIFY
packages/middleware-cors/tsconfig.json
packages/middleware-cors/tsconfig.json
"extends": "../../tsconfig.json",
"compilerOptions": {
"outDir": "./dist/",
+ "rootDir": "./src"
},
"include": ["src/**/*.ts"],
+ "references": [
+ { "path": "../core" }
+ ]
}

MODIFY
packages/middleware-io/tsconfig.json
packages/middleware-io/tsconfig.json
{
"extends": "../../tsconfig.json",
"compilerOptions": {
- "outDir": "./dist/"
+ "outDir": "./dist/",
+ "rootDir": "./src"
},
- "include": ["src/**/*.ts"]
+ "include": ["src/**/*.ts"],
+ "references": [
+ { "path": "../core" }
+ ]
}

MODIFY
packages/middleware-joi/tsconfig.json
packages/middleware-joi/tsconfig.json
"extends": "../../tsconfig.json",
"compilerOptions": {
"outDir": "./dist/",
+ "rootDir": "./src"
},
"include": ["src/**/*.ts"],
+ "references": [
+ { "path": "../core" }
+ ]
}

MODIFY
packages/middleware-jwt/tsconfig.json
packages/middleware-jwt/tsconfig.json
"extends": "../../tsconfig.json",
"compilerOptions": {
"outDir": "./dist/",
+ "rootDir": "./src"
},
"include": ["src/**/*.ts"],
+ "references": [
+ { "path": "../core" }
+ ]
}

MODIFY
packages/middleware-logger/tsconfig.json
packages/middleware-logger/tsconfig.json
{
"extends": "../../tsconfig.json",
"compilerOptions": {
- "outDir": "./dist/"
+ "outDir": "./dist/",
+ "rootDir": "./src"
},
- "include": ["src/**/*.ts"]
+ "include": ["src/**/*.ts"],
+ "references": [
+ { "path": "../core" }
+ ]
}

MODIFY
packages/middleware-multipart/tsconfig.json
packages/middleware-multipart/tsconfig.json
{
"extends": "../../tsconfig.json",
"compilerOptions": {
- "outDir": "./dist/"
+ "outDir": "./dist/",
+ "rootDir": "./src"
},
- "include": ["src/**/*.ts"]
+ "include": ["src/**/*.ts"],
+ "references": [
+ { "path": "../core" }
+ ]
}

MODIFY
packages/websockets/tsconfig.json
packages/websockets/tsconfig.json
{
"extends": "../../tsconfig.json",
"compilerOptions": {
- "outDir": "./dist/"
+ "outDir": "./dist/",
+ "rootDir": "./src"
},
- "include": ["src/**/*.ts"]
+ "include": ["src/**/*.ts"],
+ "references": [
+ { "path": "../core" }
+ ]
}

MODIFY
tsconfig.json
tsconfig.json
{
"compilerOptions": {
+ "composite": true,
"declaration": true,
+ "declarationMap": true,
"emitDecoratorMetadata": true,
"experimentalDecorators": true,
"module": "commonjs",
"suppressImplicitAnyIndexErrors": true,
"noUnusedLocals": false,
"resolveJsonModule": true,
+ "incremental": true,
"pretty": true,
"strict": true,
"target": "es6",

build(all): TypeScript project references