Skip to content

Commit

Permalink
migrate config
Browse files Browse the repository at this point in the history
  • Loading branch information
Shinigami92 committed Jun 2, 2024
1 parent d26351b commit 0a1079b
Show file tree
Hide file tree
Showing 8 changed files with 365 additions and 267 deletions.
197 changes: 0 additions & 197 deletions .eslintrc.cjs

This file was deleted.

17 changes: 9 additions & 8 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -66,20 +66,21 @@ node_modules/
.github/workflows/*.js

# IDE
/.idea
/nbproject
.idea
nbproject

# Meteor build and version
.build*
versions.json

# Dist
/dist
/docs/.vitepress/cache
/docs/.vitepress/dist
/docs/api/typedoc.json
/docs/public/api-diff-index.json
/lib
dist

# Docs
docs/.vitepress/cache
docs/.vitepress/dist
docs/api/typedoc.json
docs/public/api-diff-index.json

# Faker
TAGS
Expand Down
2 changes: 2 additions & 0 deletions docs/.vitepress/config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -91,9 +91,11 @@ function getSideBarWithExpandedEntry(entryToExpand: string): SidebarItem[] {
],
},
];

for (const entry of links) {
entry.collapsed = entry.text !== entryToExpand;
}

return links;
}

Expand Down
4 changes: 4 additions & 0 deletions docs/.vitepress/versions.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ function readOtherLatestReleaseTagNames(): string[] {
// Only consider tags for our deployed website versions
.filter((tag) => semver.major(tag) >= 6)
// Find the latest tag for each major version
// eslint-disable-next-line unicorn/no-array-reduce
.reduce<Record<number, string>>((latestTagByMajor, tag) => {
const majorVersion = semver.major(tag);

Expand All @@ -42,12 +43,15 @@ export const versionBannerInfix: string | null = (() => {
if (deployContext === 'production') {
return null;
}

if (isReleaseBranch) {
return '"an old version"';
}

if (branchName === 'next') {
return '"the next (unreleased) version"';
}

return '"a development version"';
})();

Expand Down
Loading

0 comments on commit 0a1079b

Please sign in to comment.