Skip to content

Commit

Permalink
build: Add tsconfig.json and instructions for using it
Browse files Browse the repository at this point in the history
  • Loading branch information
marlonkeating committed Apr 10, 2023
1 parent 9dcada6 commit d92c1ed
Show file tree
Hide file tree
Showing 2 changed files with 39 additions and 0 deletions.
16 changes: 16 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,3 +13,19 @@ npx install-peerdeps --dev @edx/typescript-config
```

This will install the package and all of its peer dependencies.

## Usage

Create file in repository `tsconfig.json`, adding references to the root directory, output directory, and directories to include/exclude in TypeScript compilation.

```json
{
"extends": "@edx/tsconfig",
"compilerOptions": {
"rootDir": ".",
"outDir": "dist"
},
"include": ["src/**/*"],
"exclude": ["dist"]
}
```
23 changes: 23 additions & 0 deletions tsconfig.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
{
"compilerOptions": {
"allowJs": true,
"allowSyntheticDefaultImports": true,
"declaration": true,
"esModuleInterop": true,
"forceConsistentCasingInFileNames": true,
"jsx": "react",
"lib": ["dom", "es6", "dom.iterable"],
"isolatedModules": true,
"module": "ES6",
"moduleResolution": "node",
"noFallthroughCasesInSwitch": true,
"noImplicitAny": false,
"noImplicitThis": true,
"noUnusedParameters": true,
"skipLibCheck": true,
"sourceMap": true,
"strict": true,
"strictFunctionTypes": false,
"target": "ES6",
},
}

0 comments on commit d92c1ed

Please sign in to comment.