Created
October 11, 2023 14:41
-
-
Save antonio-ivanovski/bbd3367bdb7f1be2e47c64a97ca09d81 to your computer and use it in GitHub Desktop.
Help Monorepo TS Setup
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"name": "@sample/libA", | |
"version": "1.0.0", | |
"type": "module", | |
"main": "dist/index.js", | |
"module": "dist/index.js", | |
"types": "dist/index.d.ts", | |
"scripts": { | |
"build": "run -T tsup --format cjs,esm --dts", | |
"test": "run -T vitest run", | |
"test:watch": "run -T vitest" | |
}, | |
"dependencies": { | |
"lodash": "^4.17.21" | |
}, | |
"devDependencies": { | |
"@types/lodash": "^4.14.199" | |
}, | |
"exports": { | |
".": { | |
"require": "./dist/index.cjs", | |
"import": "./dist/index.js", | |
"types": "./dist/index.d.ts" | |
}, | |
"./childSum": { | |
"require": "./dist/childSum/index.cjs", | |
"import": "./dist/childSum/index.js", | |
"types": "./dist/childSum/index.d.ts" | |
} | |
} | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"extends": "../../tsconfig.base.json", | |
"compilerOptions": { | |
"outDir": "./dist", | |
"rootDir": "./src", | |
"declaration": true | |
}, | |
"include": ["src/**/*.ts"], | |
"exclude": ["node_modules", "dist"] | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"name": "@sample/node-app", | |
"version": "1.0.0", | |
"type": "module", | |
"main": "dist/index.js", | |
"module": "dist/index.js", | |
"types": "dist/index.d.ts", | |
"scripts": { | |
"build": "run -T tsup src/index.ts --format cjs,esm --dts", | |
"serve": "run -T tsup src/index.ts --format esm --watch --onSuccess 'node dist/index.js'", | |
"test": "run -T vitest run", | |
"test:watch": "run -T vitest" | |
}, | |
"dependencies": { | |
"@sample/libA": "workspace:^", | |
"express": "^4.18.2" | |
}, | |
"devDependencies": { | |
"@types/express": "^4.17.18" | |
} | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"extends": "../../tsconfig.base.json", | |
"compilerOptions": { | |
"outDir": "./dist", | |
"rootDir": "./src" | |
}, | |
"include": ["src/**/*.ts"] | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"compilerOptions": { | |
"baseUrl": ".", | |
"target": "ES2022", | |
"moduleResolution": "Bundler", | |
"module": "ESNext", | |
"useDefineForClassFields": true, | |
"verbatimModuleSyntax": true, | |
"skipLibCheck": true, | |
"moduleDetection": "force", | |
"noEmit": true, | |
"esModuleInterop": true, | |
"strict": true, | |
"noUncheckedIndexedAccess": true, | |
"forceConsistentCasingInFileNames": true, | |
"lib": ["ES2022"], | |
"types": ["vitest/globals"], | |
"composite": true, | |
"declarationMap": true | |
}, | |
"exclude": ["node_modules", "dist"] | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment