Skip to content

Commit

Permalink
Re-order the README, and switch to 1.0 prod stuff
Browse files Browse the repository at this point in the history
  • Loading branch information
orta committed May 29, 2020
1 parent c4393d7 commit 4ab0c16
Show file tree
Hide file tree
Showing 4 changed files with 29 additions and 25 deletions.
3 changes: 1 addition & 2 deletions .vscode/extensions.json
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
{
// https://github.com/denoland/vscode_deno/issues/4
"recommendations": ["justjavac.vscode-deno"]
"recommendations": ["denoland.vscode-deno"]
}
4 changes: 2 additions & 2 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"cSpell.words": [
"Deno"
]

],
"deno.enable": true
}
32 changes: 16 additions & 16 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,61 +6,61 @@ Basically Definitely Typed for TSConfigs.
In this repo:

<!-- AUTO -->
### Node 12 <kbd><a href="./bases/node12.json">tsconfig.json</a></kbd>
### Deno <kbd><a href="./bases/deno.json">tsconfig.json</a></kbd>

Install:

```sh
npm install --save-dev @tsconfig/node12
yarn add --dev @tsconfig/node12
npm install --save-dev @tsconfig/deno
yarn add --dev @tsconfig/deno
```

Add to your `tsconfig.json`:

```json
"extends": "@tsconfig/node12/tsconfig.json"
"extends": "@tsconfig/deno/tsconfig.json"
```
### Deno <kbd><a href="./bases/deno.json">tsconfig.json</a></kbd>
### Node 10 <kbd><a href="./bases/node10.json">tsconfig.json</a></kbd>

Install:

```sh
npm install --save-dev @tsconfig/deno
yarn add --dev @tsconfig/deno
npm install --save-dev @tsconfig/node10
yarn add --dev @tsconfig/node10
```

Add to your `tsconfig.json`:

```json
"extends": "@tsconfig/deno/tsconfig.json"
"extends": "@tsconfig/node10/tsconfig.json"
```
### React Native <kbd><a href="./bases/react-native.json">tsconfig.json</a></kbd>
### Node 12 <kbd><a href="./bases/node12.json">tsconfig.json</a></kbd>

Install:

```sh
npm install --save-dev @tsconfig/react-native
yarn add --dev @tsconfig/react-native
npm install --save-dev @tsconfig/node12
yarn add --dev @tsconfig/node12
```

Add to your `tsconfig.json`:

```json
"extends": "@tsconfig/react-native/tsconfig.json"
"extends": "@tsconfig/node12/tsconfig.json"
```
### Node 10 <kbd><a href="./bases/node10.json">tsconfig.json</a></kbd>
### React Native <kbd><a href="./bases/react-native.json">tsconfig.json</a></kbd>

Install:

```sh
npm install --save-dev @tsconfig/node10
yarn add --dev @tsconfig/node10
npm install --save-dev @tsconfig/react-native
yarn add --dev @tsconfig/react-native
```

Add to your `tsconfig.json`:

```json
"extends": "@tsconfig/node10/tsconfig.json"
"extends": "@tsconfig/react-native/tsconfig.json"
```

<!-- /AUTO -->
Expand Down
15 changes: 10 additions & 5 deletions scripts/update-markdown-readme.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,16 +5,21 @@ import * as path from "https://deno.land/std/path/mod.ts";
const readme = await Deno.readTextFileSync("./README.md")
let center = ""

const paths = []
for await (const tsconfigEntry of Deno.readDir("bases")) {
if (!tsconfigEntry.isFile) continue

const tsconfigFilePath = path.join("bases", tsconfigEntry.name)
const name = path.basename(tsconfigEntry.name).replace(".json", "")
paths.push(tsconfigEntry.name)
}

const sortedPaths = paths.sort((l, r) => l.localeCompare(r))
for (const base of sortedPaths) {
const tsconfigFilePath = path.join("bases", base)
const name = path.basename(base).replace(".json", "")

const tsconfigText = await Deno.readTextFile(tsconfigFilePath)
const tsconfigJSON = JSON.parse(tsconfigText)

center += `### ${tsconfigJSON.display} <kbd><a href="./bases/${tsconfigEntry.name}">tsconfig.json</a></kbd>\n`
center += `### ${tsconfigJSON.display} <kbd><a href="./bases/${base}">tsconfig.json</a></kbd>\n`

center += `
Install:
Expand All @@ -30,7 +35,7 @@ Add to your \`tsconfig.json\`:
"extends": "@tsconfig/${name}/tsconfig.json"
\`\`\`
`
}
};

const startMarker ="<!-- AUTO -->"
const start = readme.split(startMarker)[0]
Expand Down

0 comments on commit 4ab0c16

Please sign in to comment.