From bbb4c2444afaae926d0f4137b859de47580bc805 Mon Sep 17 00:00:00 2001 From: jaywcjlove <398188662@qq.com> Date: Mon, 31 Jul 2023 09:29:24 +0800 Subject: [PATCH] website(deps): Modify kkt config. --- www/.kktrc.ts | 13 ++----------- www/package.json | 10 +++++----- 2 files changed, 7 insertions(+), 16 deletions(-) diff --git a/www/.kktrc.ts b/www/.kktrc.ts index a9fe98f2..f9264a6a 100644 --- a/www/.kktrc.ts +++ b/www/.kktrc.ts @@ -1,24 +1,15 @@ -import path from 'path'; import webpack, { Configuration } from 'webpack'; import { LoaderConfOptions } from 'kkt'; -import lessModules from '@kkt/less-modules'; import rawModules from '@kkt/raw-modules'; -import scopePluginOptions from '@kkt/scope-plugin-options'; +import { disableScopePlugin } from '@kkt/scope-plugin-options'; import MonacoWebpackPlugin from 'monaco-editor-webpack-plugin'; import { mdCodeModulesLoader } from 'markdown-react-code-preview-loader'; import pkg from './package.json'; export default (conf: Configuration, env: 'production' | 'development', options: LoaderConfOptions) => { - conf = lessModules(conf, env, options); conf = rawModules(conf, env, { ...options, test: /\.(md|txt)$/i }); conf = mdCodeModulesLoader(conf); - conf = scopePluginOptions(conf, env, { - ...options, - allowedFiles: [ - path.resolve(process.cwd(), 'README.md'), - path.resolve(process.cwd(), 'src'), - ] - }); + conf = disableScopePlugin(conf); conf.plugins!.push(new MonacoWebpackPlugin({ // languages: ['bat', 'coffee', 'cpp', 'csharp', 'csp', 'css', 'dockerfile', 'fsharp', 'go', 'handlebars', 'html', 'ini', 'java', 'json', 'less', 'lua', 'markdown', 'msdax', 'mysql', 'objective', 'pgsql', 'php', 'postiats', 'powershell', 'pug', 'python', 'r', 'razor', 'redis', 'redshift', 'ruby', 'sb', 'scss', 'solidity', 'sql', 'swift', 'typescript', 'vb', 'xml', 'yaml'], // features: ['accessibilityHelp', 'bracketMatching', 'caretOperations', 'clipboard', 'codelens', 'colorDetector', 'comment', 'contextmenu', 'coreCommands', 'cursorUndo', 'dnd', 'find', 'folding', 'format', 'gotoDeclarationCommands', 'gotoDeclarationMouse', 'gotoError', 'gotoLine', 'hover', 'inPlaceReplace', 'inspectTokens', 'iPadShowKeyboard', 'linesOperations', 'links', 'multicursor', 'parameterHints', 'quickCommand', 'quickFixCommands', 'quickOutline', 'referenceSearch', 'rename', 'smartSelect', 'snippets', 'suggest', 'toggleHighContrast', 'toggleTabFocusMode', 'transpose', 'wordHighlighter', 'wordOperations'], diff --git a/www/package.json b/www/package.json index f99aa7b5..1aa8b8b0 100644 --- a/www/package.json +++ b/www/package.json @@ -10,20 +10,20 @@ "dependencies": { "@uiw/react-markdown-preview-example": "^1.5.6", "@uiw/react-monacoeditor": "3.5.8", + "monaco-editor": "^0.39.0", "code-example": "^3.3.6", "react": "^18.2.0", "react-dom": "^18.2.0" }, "devDependencies": { "@babel/plugin-proposal-private-property-in-object": "^7.21.11", - "@kkt/raw-modules": "^7.5.1", - "@kkt/less-modules": "^7.5.1", - "@kkt/scope-plugin-options": "^7.5.1", + "@kkt/raw-modules": "^7.5.2", + "@kkt/scope-plugin-options": "^7.5.2", "@types/react": "^18.0.31", "@types/react-dom": "^18.0.11", - "kkt": "^7.5.1", + "kkt": "^7.5.2", "monaco-editor-webpack-plugin": "~7.0.1", - "markdown-react-code-preview-loader": "^2.1.2", + "markdown-react-code-preview-loader": "^2.1.7", "source-map-explorer": "^2.5.3" }, "eslintConfig": {