Skip to content

Commit

Permalink
feat: add @mjolnir/tsconfig (#12)
Browse files Browse the repository at this point in the history
  • Loading branch information
leohxj authored Aug 14, 2019
1 parent 1f6c3c5 commit 8df743d
Show file tree
Hide file tree
Showing 4 changed files with 61 additions and 0 deletions.
19 changes: 19 additions & 0 deletions packages/tsconfig/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
# @mjolnir/tsconfig
Shared TypeScript config for @mjolnir.

## install
`yarn add @mjolnir/tsconfig -D`

or

`npm i @mjolnir/tsconfig -D`

## useage
add `extends` in your tsconfig.json:

```json
{
"extends": "@mjolnir/tsconfig",
...
}
```
11 changes: 11 additions & 0 deletions packages/tsconfig/base.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
{
"compilerOptions": {
"module": "commonjs",
"target": "es2018",
"lib": [
"esnext"
],
"esModuleInterop": true,
"moduleResolution": "node"
}
}
9 changes: 9 additions & 0 deletions packages/tsconfig/node.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
{
"compilerOptions": {
"module": "es6",
"target": "es5",
"lib": ["esnext", "dom"],
"esModuleInterop": true,
"moduleResolution": "node"
}
}
22 changes: 22 additions & 0 deletions packages/tsconfig/package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
{
"name": "@mjolnir/tsconfig",
"version": "0.0.1",
"description": "> TODO: description",
"homepage": "https://github.com/mjolnirjs/mjolnir/tree/master/packages/tsconfig#readme",
"license": "MIT",
"main": "base.json",
"files": [],
"publishConfig": {
"access": "public"
},
"repository": {
"type": "git",
"url": "git+https://github.com/mjolnirjs/mjolnir.git"
},
"scripts": {
"test": "echo \"Error: run tests from root\" && exit 1"
},
"bugs": {
"url": "https://github.com/mjolnirjs/mjolnir/issues"
}
}

0 comments on commit 8df743d

Please sign in to comment.