Skip to content

Commit

Permalink
[deploy_website] follow typedoc's compatible typescript versiobn
Browse files Browse the repository at this point in the history
  • Loading branch information
ardatan committed Jun 8, 2021
1 parent 381afce commit 0a80d9e
Show file tree
Hide file tree
Showing 6 changed files with 27 additions and 8 deletions.
4 changes: 3 additions & 1 deletion .github/workflows/website.yml
Original file line number Diff line number Diff line change
Expand Up @@ -39,8 +39,10 @@ jobs:
restore-keys: |
${{ runner.os }}-16-node-modules-${{ hashFiles('yarn.lock') }}
${{ runner.os }}-16-node-modules-
- name: Align TypeScript version with typedoc
run: node scripts/install-typedocs-typescript-version.js
- name: Install Dependencies using Yarn
run: yarn install && git checkout yarn.lock
run: yarn install && git checkout yarn.lock && git checkout package.json
- name: Deploy 🚀
run: yarn deploy:website
env:
Expand Down
3 changes: 2 additions & 1 deletion renovate.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,5 +6,6 @@
"major": {
"automerge": false
},
"labels": ["dependencies"]
"labels": ["dependencies"],
"ignoreDeps": ["typedoc-plugin-markdown"]
}
16 changes: 16 additions & 0 deletions scripts/install-typedocs-typescript-version.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
const { writeFileSync } = require('fs');
const { resolve } = require('path');
const { argv, cwd } = require('process');

const typeDocsVersion = require('typedoc/package.json');
const pkgPath = resolve(cwd(), './package.json');

const pkg = require(pkgPath);

const version = argv[2];

pkg.resolutions = pkg.resolutions || {};

pkg.resolutions.typescript = typeDocsVersion.peerDependencies.typescript;

writeFileSync(pkgPath, JSON.stringify(pkg, null, 2), 'utf8');
2 changes: 1 addition & 1 deletion website/docs/cache/localforage.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,4 +24,4 @@ cache:
## Config API Reference
{@import ../generated-markdown/Localforage.generated.md}
{@import ../generated-markdown/LocalforageConfig.generated.md}
6 changes: 3 additions & 3 deletions website/docs/cache/redis.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
---
id: cache-file
title: File Cache
sidebar_label: File
id: cache-redis
title: Redis Cache
sidebar_label: Redis
---

This caching strategy will use your Redis instance as the storage.
Expand Down
4 changes: 2 additions & 2 deletions website/sidebars.js
Original file line number Diff line number Diff line change
Expand Up @@ -37,9 +37,9 @@ module.exports = {
],
Cache: [
'cache/inmemory-lru',
'cache/file',
'cache/cache-file',
'cache/localforage',
'cache/redis'
'cache/cache-redis'
],
Recipes: [
'recipes/typescript',
Expand Down

0 comments on commit 0a80d9e

Please sign in to comment.