From 37e7729943b1f6764ac6f4fde258a11010184f8f Mon Sep 17 00:00:00 2001 From: wkylin Date: Fri, 18 Oct 2024 23:28:04 +0800 Subject: [PATCH] chore: js analyzer --- js-analyzer.js | 21 +++++++++++++++++++++ package.json | 2 +- 2 files changed, 22 insertions(+), 1 deletion(-) create mode 100644 js-analyzer.js diff --git a/js-analyzer.js b/js-analyzer.js new file mode 100644 index 00000000..bf03090d --- /dev/null +++ b/js-analyzer.js @@ -0,0 +1,21 @@ +module.exports = { + // Root directory + root: '/wui/pro-react/pro-react-admin', + // Directories that do not need to be analyzed + ignore: ['**/node_modules/**', '**/dist/**'], + // Order of preference when parsing files without extensions + extensions: ['.js', '.ts', '.tsx', '.vue', '.json', '.jsx'], + // Path mapping of the project's alias + alias: { + '@@/': '/', + '~~/': '/', + '@/': '/src/', + '~/': '/src/', + }, + // Server and port related information + server: { + port: 8088, + host: 'localhost', + openBrowser: true, // Automatically open in browser after startup + }, +} diff --git a/package.json b/package.json index d00162de..ba10231a 100644 --- a/package.json +++ b/package.json @@ -70,7 +70,7 @@ "clean:lock": "rm -rf package-lock.json yarn.lock pnpm-lock.yaml", "clean:dist": "rm -rf ./dist", "clean:modules": "rm -rf node_modules", - "js-analyzer": "js-analyzer --root ./" + "js-analyzer": "js-analyzer --config ./js-analyzer.js" }, "author": "wkylin", "contributors": [