2.6.0 • Published 3 years ago
@dcm/tsconfig v2.6.0
@dcm/tsconfig
Shareable tsconfig.json file and generator of @dcmhub
Installation
# Install with npx
$ npx install-peerdeps --dev @dcm/tsconfig
# Install with NPM
$ npm i -D @dcm/tsconfig typescript
# Install with yarn
$ yarn add --dev @dcm/tsconfig typescript
Usage
After installation, create your own tsconfig.json
file, then extends from this package.
{
"extends": "@dcm/tsconfig"
}
There are four shareable configs in the package, the default export of this package is modern react project.
- node: Node backend or CLI project
- react: React modern (esnext) project
- react-legacy: React legacy (es5) project
- react-native: React native project
You can extends them as below, then overwirte properties with your own prefers.
{
"extends": "@dcm/tsconfig/node",
"include": ["src"],
"compilerOptions": {
"allowJs": false,
"noEmit": false,
"outDir": "build",
"rootDir": "src"
}
}
CLI
If you want to generate your own tsconfig.json
file, just run npx tsconfig
in your project root.
$ npx @dcm/tsconfig
? Pick up type of your typescript project: (Use arrow keys)
Node backend or CLI project
❯ React modern (esnext) project
React legacy (es5) project
React native project
Notes
- Check node.green for node.js es2015 support infomation.
node_modules
andoutDir
will be excluded by default, you don't need to exclude them manually.- Remove
outDir
from shareable config because of this issue.
License
MIT
2.6.0
3 years ago
2.5.15
3 years ago
2.5.6
3 years ago
2.5.7
3 years ago
2.5.0
3 years ago
2.4.20
3 years ago
2.4.15
3 years ago
2.4.13
4 years ago
2.4.9
4 years ago
2.3.0
4 years ago
2.1.0
4 years ago
2.0.1
4 years ago
2.0.0
4 years ago
1.2.7
5 years ago
1.2.6
5 years ago
1.2.5
5 years ago
1.2.4
5 years ago
1.2.3
5 years ago
1.1.2
5 years ago
1.0.8
5 years ago
1.0.7
5 years ago
1.0.6
5 years ago
1.0.5
5 years ago
1.0.4
5 years ago
1.0.3
5 years ago
1.0.2
5 years ago
1.0.1
5 years ago
1.0.0
5 years ago