Skip to content

Commit

Permalink
redirects and dep upgrades
Browse files Browse the repository at this point in the history
  • Loading branch information
Daniel Del Core committed Jul 15, 2024
1 parent 23dba1a commit d81443c
Show file tree
Hide file tree
Showing 10 changed files with 3,667 additions and 2,588 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/documentation.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ jobs:
- uses: actions/checkout@v1
- uses: actions/setup-node@v1
with:
node-version: '16.x'
node-version: '18.x'
- name: Generate docs
run: |
yarn install --frozen-lockfile
Expand All @@ -32,7 +32,7 @@ jobs:
- uses: actions/checkout@v1
- uses: actions/setup-node@v1
with:
node-version: '16.x'
node-version: '18.x'
- uses: webfactory/[email protected]
with:
ssh-private-key: ${{ secrets.GH_PAGES_DEPLOY }}
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,10 +16,10 @@ jobs:
# This makes Actions fetch all Git history so that Changesets can generate changelogs with the correct commits
fetch-depth: 0

- name: Setup Node.js 16.x
- name: Setup Node.js 18.x
uses: actions/setup-node@master
with:
node-version: 16.x
node-version: 18.x

- name: Install Dependencies
run: yarn
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/test-integration.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ jobs:

strategy:
matrix:
node-version: [16.x]
node-version: [18.x]

steps:
- uses: actions/checkout@v2
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ jobs:

strategy:
matrix:
node-version: [16.x]
node-version: [18.x]

steps:
- uses: actions/checkout@v2
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/validate.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ jobs:

strategy:
matrix:
node-version: [16.x]
node-version: [18.x]

steps:
- uses: actions/checkout@v2
Expand Down
2 changes: 1 addition & 1 deletion .nvmrc
Original file line number Diff line number Diff line change
@@ -1 +1 @@
v16.13.2
v18
3 changes: 0 additions & 3 deletions website/docs/faq.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,3 @@ slug: /faq
By default, CodeshiftCommunity uses JSCodeshift because it is the most commonly used AST transformation library in the community. Many codemods are already written with JSCodeshift, and our goal is to consolidate these codemods in one place.

However, we are compatible with any JS-based AST transformation library, such as **Babel**, **PostCSS**, and **esprima**. We also provide guides for using non-JSCodeshift libraries, and we aim to support the transformation of any target file, including but not limited to JS, TS, CSS, LESS, Sass, and JSON.

For guidance on writing codemods with postcss, please refer to our guide on [CSS codemods via PostCSS](docs/css-codemods).

45 changes: 43 additions & 2 deletions website/docusaurus.config.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,9 @@
/** @type {import('@docusaurus/types').DocusaurusConfig} */

const { themes } = require('prism-react-renderer');
const lightTheme = themes.github;
const darkTheme = themes.palenight;

module.exports = {
title: 'Hypermod Community',
tagline: 'Codemods for everyone ✨',
Expand All @@ -11,6 +16,9 @@ module.exports = {
projectName: 'hypermod-community',
trailingSlash: false,
themeConfig: {
defaultMode: 'light',
disableSwitch: true,
respectPrefersColorScheme: false,
image: 'img/TwitterBanner.png',
metadata: [
{
Expand All @@ -30,8 +38,8 @@ module.exports = {
},
],
prism: {
theme: require('prism-react-renderer/themes/github'),
darkTheme: require('prism-react-renderer/themes/palenight'),
theme: lightTheme,
darkTheme: darkTheme,
},
navbar: {
title: 'Hypermod Community',
Expand Down Expand Up @@ -164,4 +172,37 @@ module.exports = {
async: true,
},
],
plugins: [
[
'@docusaurus/plugin-client-redirects',
{
redirects: [
{
from: '/docs',
to: 'https://www.hypermod.io/docs',
},
{
from: '/docs/your-first-codemod',
to: 'https://www.hypermod.io/docs/guides/your-first-codemod',
},
{
from: '/docs/understanding-asts',
to: 'https://www.hypermod.io/docs/guides/understanding-asts',
},
{
from: '/docs/import-manipulation',
to: 'https://www.hypermod.io/docs/guides/import-manipulation',
},
{
from: '/docs/react',
to: 'https://www.hypermod.io/docs/guides/react-jsx',
},
{
from: '/docs/typescript',
to: 'https://www.hypermod.io/docs/guides/typescript',
},
],
},
],
],
};
19 changes: 14 additions & 5 deletions website/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,12 +14,18 @@
"write-heading-ids": "docusaurus write-heading-ids"
},
"dependencies": {
"@docusaurus/core": "2.4.1",
"@docusaurus/preset-classic": "2.4.1",
"@mdx-js/react": "^1.6.21",
"@docusaurus/core": "^3.4.0",
"@docusaurus/plugin-client-redirects": "^3.4.0",
"@docusaurus/preset-classic": "^3.4.0",
"@mdx-js/react": "^3.0.0",
"clsx": "^1.1.1",
"react": "^17.0.1",
"react-dom": "^17.0.1"
"prism-react-renderer": "^2.1.0",
"react": "^18.2.0",
"react-dom": "^18.2.0"
},
"devDependencies": {
"@docusaurus/module-type-aliases": "^3.4.0",
"@docusaurus/types": "^3.4.0"
},
"browserslist": {
"production": [
Expand All @@ -32,5 +38,8 @@
"last 1 firefox version",
"last 1 safari version"
]
},
"engines": {
"node": ">=18.0"
}
}
Loading

0 comments on commit d81443c

Please sign in to comment.