From 54ee6d2734664b87696ae1044debf3d6647dcda4 Mon Sep 17 00:00:00 2001 From: daishi Date: Sat, 4 May 2024 12:06:34 +0900 Subject: [PATCH] website: fix plugin --- .../docusaurus-remark-plugin-ts2js/src/index.js | 7 +++++-- website/package.json | 1 + 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/website/custom_modules/docusaurus-remark-plugin-ts2js/src/index.js b/website/custom_modules/docusaurus-remark-plugin-ts2js/src/index.js index f69407ef..d6737b5f 100644 --- a/website/custom_modules/docusaurus-remark-plugin-ts2js/src/index.js +++ b/website/custom_modules/docusaurus-remark-plugin-ts2js/src/index.js @@ -3,7 +3,7 @@ const ts = require('typescript'); const prettier = require('prettier/standalone'); const parserTypescript = require('prettier/parser-typescript'); -const prettierPluginEstree = require('prettier/plugins/estree'); +// const prettierPluginEstree = require('prettier/plugins/estree'); const stripTypes = (origCode) => { const modifiedCode = origCode.replace(/\n\n/g, '\n//--EMPTYLINE--\n'); @@ -21,7 +21,10 @@ const stripTypes = (origCode) => { const format = (code) => prettier.format(code, { parser: 'typescript', - plugins: [parserTypescript, prettierPluginEstree], + plugins: [ + parserTypescript, + // prettierPluginEstree, + ], singleQuote: true, trailingComma: 'all', }); diff --git a/website/package.json b/website/package.json index 5b9f9365..148efab6 100644 --- a/website/package.json +++ b/website/package.json @@ -2,6 +2,7 @@ "private": true, "scripts": { "start": "docusaurus start", + "serve": "docusaurus serve", "build": "docusaurus build", "swizzle": "docusaurus swizzle", "deploy": "docusaurus deploy"