Skip to content

Commit

Permalink
update website
Browse files Browse the repository at this point in the history
  • Loading branch information
dai-shi committed Mar 2, 2024
1 parent 7619f46 commit c5ed839
Show file tree
Hide file tree
Showing 4 changed files with 3,493 additions and 2,790 deletions.
Original file line number Diff line number Diff line change
@@ -1,12 +1,13 @@
{
"name": "docusaurus-remark-plugin-ts2js",
"version": "0.1.0",
"private": true,
"description": "Docusaurus TS2JS CodeBlock",
"main": "src/index.js",
"dependencies": {},
"peerDependencies": {
"prettier": "^1.18.2",
"typescript": "^3.6.3"
"prettier": "^3.2.5",
"typescript": "^5.3.3"
},
"license": "MIT"
}
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
const ts = require('typescript');
const prettier = require('prettier/standalone');
const parserTypescript = require('prettier/parser-typescript');
const prettierPluginEstree = require('prettier/plugins/estree');

const stripTypes = (origCode) => {
const modifiedCode = origCode.replace(/\n\n/g, '\n//--EMPTYLINE--\n');
Expand All @@ -19,7 +20,7 @@ const stripTypes = (origCode) => {

const format = (code) => prettier.format(code, {
parser: 'typescript',
plugins: [parserTypescript],
plugins: [parserTypescript, prettierPluginEstree],
singleQuote: true,
trailingComma: 'all',
});
Expand Down
12 changes: 6 additions & 6 deletions website/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,14 +7,14 @@
"deploy": "docusaurus deploy"
},
"dependencies": {
"@docusaurus/core": "^2.4.1",
"@docusaurus/preset-classic": "^2.4.1",
"@docusaurus/theme-live-codeblock": "^2.4.1",
"@mdx-js/react": "^1.6.22",
"prettier": "^2.8.8",
"@docusaurus/core": "^3.1.1",
"@docusaurus/preset-classic": "^3.1.1",
"@docusaurus/theme-live-codeblock": "^3.1.1",
"@mdx-js/react": "^3.0.1",
"prettier": "^3.2.5",
"react": "^18.2.0",
"react-dom": "^18.2.0",
"typescript": "^5.1.3"
"typescript": "^5.3.3"
},
"browserslist": {
"production": [
Expand Down
Loading

0 comments on commit c5ed839

Please sign in to comment.