Skip to content

Commit

Permalink
refactor: rewrite using typescript
Browse files Browse the repository at this point in the history
- use typescript
- merge monkey script code
- improve error message
  • Loading branch information
me1ting committed Dec 28, 2023
1 parent 011a73d commit ca13b0d
Show file tree
Hide file tree
Showing 32 changed files with 2,846 additions and 2,722 deletions.
17 changes: 9 additions & 8 deletions .eslintrc.cjs
Original file line number Diff line number Diff line change
@@ -1,14 +1,15 @@
/* eslint-env node */
require("@rushstack/eslint-patch/modern-module-resolution");
require('@rushstack/eslint-patch/modern-module-resolution')

module.exports = {
root: true,
extends: [
"plugin:vue/vue3-essential",
"eslint:recommended",
"@vue/eslint-config-prettier",
'extends': [
'plugin:vue/vue3-essential',
'eslint:recommended',
'@vue/eslint-config-typescript',
'@vue/eslint-config-prettier/skip-formatting'
],
parserOptions: {
ecmaVersion: "latest",
},
};
ecmaVersion: 'latest'
}
}
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ node_modules
.DS_Store
dist
dist-ssr
dist-monkey
coverage
*.local

Expand All @@ -26,3 +27,5 @@ coverage
*.njsproj
*.sln
*.sw?

*.tsbuildinfo
15 changes: 6 additions & 9 deletions .prettierrc.json
Original file line number Diff line number Diff line change
@@ -1,11 +1,8 @@
{
"$schema": "https://json.schemastore.org/prettierrc",
"semi": false,
"tabWidth": 2,
"singleQuote": true,
"printWidth": 100,
"overrides": [
{
"files": "src/**/*.js",
"options": {
"tabWidth": 4
}
}
]
}
"trailingComma": "none"
}
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
# cn-poe-export-extension

POE国服导出工具。

![查看 poesessid](https://github.com/me1ting/cn-poe-export-extension/blob/master/previews/exporter.png?raw=true "查看 poesessid")
Expand Down
1 change: 1 addition & 0 deletions env.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
/// <reference types="vite/client" />
36 changes: 36 additions & 0 deletions mokey.vite.config.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
import { fileURLToPath, URL } from 'node:url'
import { resolve } from "path"

import { defineConfig } from 'vite'
import vue from '@vitejs/plugin-vue'
import cssInjectedByJsPlugin from 'vite-plugin-css-injected-by-js'

// https://vitejs.dev/config/
export default defineConfig({
plugins: [
vue(),
cssInjectedByJsPlugin(),
],
resolve: {
alias: {
'@': fileURLToPath(new URL('./src', import.meta.url))
}
},
build: {
rollupOptions: {
external: [
'vue',
'cn-poe-translator',
'cn-poe-export-db',
'pob-building-creater',
'axios',
],
input: {
monkey: resolve(__dirname, "pages/monkey.html"),
},
},
outDir: "dist-monkey",
copyPublicDir: false,
minify: false,
}
})
Loading

0 comments on commit ca13b0d

Please sign in to comment.