Skip to content

Commit

Permalink
tsconfig and script to handle dist creation
Browse files Browse the repository at this point in the history
  • Loading branch information
jbolda committed Jun 3, 2024
1 parent 47cd703 commit 4009fe2
Show file tree
Hide file tree
Showing 5 changed files with 42 additions and 5 deletions.
22 changes: 19 additions & 3 deletions packages/foundation/package.json
Original file line number Diff line number Diff line change
@@ -1,21 +1,37 @@
{
"name": "@simulacrum/foundation-simulator",
"version": "0.0.1",
"description": "",
"main": "server.ts",
"description": "Base simulator to build simulators for integration testing.",
"author": "Frontside Engineering <[email protected]>",
"license": "MIT",
"bugs": {
"url": "https://github.com/thefrontside/simulacrum/issues"
},
"homepage": "https://github.com/thefrontside/simulacrum#readme",
"keywords": [
"simulation",
"emulation",
"mock",
"mocking",
"integration testing"
],
"main": "dist/index.js",
"scripts": {
"start": "node --import=tsx example/server.ts",
"start:server": "node --import=tsx example/server.ts",
"start:extensive": "node --import=tsx example/extensiveServer.ts",
"prepack": "tsc --build tsconfig.dist.json",
"test": "echo \"Error: no test specified\" && exit 1"
},
"author": "",
"dependencies": {
"express": "^4.19.2",
"openapi-backend": "^5.10.6",
"openapi-merge": "^1.3.2",
"starfx": "^0.12.0",
"tsx": "^4.11.0",
"typescript": "^5.4.5"
},
"volta": {
"extends": "../../package.json"
}
}
9 changes: 9 additions & 0 deletions packages/foundation/tsconfig.dist.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
{
"extends": "./tsconfig.json",
"compilerOptions": {
"outDir": "dist/cjs",
"rootDir": "src",
"noEmit": false
},
"exclude": ["test"]
}
8 changes: 8 additions & 0 deletions packages/foundation/tsconfig.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
{
"extends": "../../tsconfig.base.json",
"compilerOptions": {
"baseUrl": ".",
"noEmit": true
},
"include": ["src/**/*.ts", "test/**/*.ts"]
}
3 changes: 2 additions & 1 deletion tsconfig.base.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,8 @@
"@simulacrum/auth0-simulator": ["packages/auth0/src"],
"@simulacrum/client": ["packages/client/src"],
"@simulacrum/server": ["packages/server/src"],
"@simulacrum/github-api-simulator": ["packages/github-api"]
"@simulacrum/github-api-simulator": ["packages/github-api"],
"@simulacrum/foundation-simulator": ["packages/foundation"]
}
}
}
5 changes: 4 additions & 1 deletion tsconfig.packages.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,9 @@
},
{
"path": "../packages/github-api/tsconfig.dist.json"
},
{
"path": "../packages/foundation/tsconfig.dist.json"
}
]
}
}

0 comments on commit 4009fe2

Please sign in to comment.