This commit is contained in:
xyf-mac
2021-04-02 21:49:55 +08:00
parent 8149dd50cc
commit 0a4c732112
9 changed files with 14073 additions and 0 deletions

26
source/.eslintrc.js Normal file
View File

@@ -0,0 +1,26 @@
module.exports = {
root: true,
env: {
webextensions: true
},
parser: "vue-eslint-parser",
parserOptions: {
"parser": "babel-eslint",
"ecmaVersion": 2020,
ecmaFeatures: {
legacyDecorators: true
}
},
extends: [
"plugin:vue/essential",
"eslint:recommended",
"@vue/typescript/recommended",
"@vue/prettier",
"@vue/prettier/@typescript-eslint"
],
rules: {
"@typescript-eslint/explicit-module-boundary-types": "off",
"@typescript-eslint/no-unused-vars": "off"
}
};

23
source/.gitignore vendored Normal file
View File

@@ -0,0 +1,23 @@
.DS_Store
node_modules
/dist
# local env files
.env.local
.env.*.local
# Log files
npm-debug.log*
yarn-debug.log*
yarn-error.log*
pnpm-debug.log*
# Editor directories and files
.idea
.vscode
*.suo
*.ntvs*
*.njsproj
*.sln
*.sw?

1
source/README.md Normal file
View File

@@ -0,0 +1 @@

3
source/babel.config.js Normal file
View File

@@ -0,0 +1,3 @@
module.exports = {
presets: ["@vue/cli-plugin-babel/preset"],
};

28
source/dist.pem Normal file
View File

@@ -0,0 +1,28 @@
-----BEGIN PRIVATE KEY-----
MIIEvgIBADANBgkqhkiG9w0BAQEFAASCBKgwggSkAgEAAoIBAQDKA+h2e8dPlzt3
RRXtRZuY3s/dhaxIz7TbiUQymqwi8vhUx3p9LzBbQSK3qOjJGifsrkf2C6TpmvWZ
lpTbDdl4hz5Z5Ljrt2GtehEGlb/IxbiuEuAKfznrljMKwDHdp809hmc6XtwZdvW0
B/0yfRtUKZ+9HH6rvQBtcDaZ4fAkX2BIcqw/j5CIzW+IyziswnFoMQkC68Cu2vS1
mNSU8foYlxQAsmttbzr/PGZkrOL92oeVoJJfPfR7eBP8JhSbVJ6GGdhw72SQTByY
5e9Pl94veUdhwryH/xtsb27YrNO8EPbwMyJvu+LYp2Im5IOC3HvChB/XpfnnqfgZ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ZVg/b5OPXLDIHulTdAoGBAIhFZhcl1/W7ANlFvYy/
6OuxjHYCqFgOa4qYz9ia2X9UnK+SOqTLplZtbbYag4OIxvGZAQ3+Ys6Tm0Y4IySk
qB8d1aSzJelu8feqJtWf9QZFbHvdN+orRQkhPwydC0m/ujefy/+v/edCXv9kWCdj
mw7DaZnzhqap9CnBXnYXFP+5
-----END PRIVATE KEY-----

13894
source/package-lock.json generated Normal file

File diff suppressed because it is too large Load Diff

55
source/package.json Normal file
View File

@@ -0,0 +1,55 @@
{
"name": "app",
"version": "0.1.0",
"private": true,
"scripts": {
"serve": "vue-cli-service serve",
"build": "vue-cli-service build",
"lint": "vue-cli-service lint",
"prepare1": "vue-cli-service build --target lib --name content src/content.ts"
},
"dependencies": {
"@types/fs-extra": "^9.0.9",
"babel-eslint": "^10.1.0",
"core-js": "^3.6.5",
"element-ui": "^2.15.1",
"fs-extra": "^9.1.0",
"less": "^4.1.1",
"less-loader": "^7.3.0",
"vue": "^2.6.11",
"vue-class-component": "^7.2.3",
"vue-property-decorator": "^9.1.2"
},
"devDependencies": {
"@types/chrome": "0.0.133",
"@typescript-eslint/eslint-plugin": "^4.18.0",
"@typescript-eslint/parser": "^4.18.0",
"@vue/cli-plugin-babel": "~4.5.0",
"@vue/cli-plugin-eslint": "~4.5.0",
"@vue/cli-plugin-typescript": "~4.5.0",
"@vue/cli-service": "~4.5.0",
"@vue/eslint-config-prettier": "^6.0.0",
"@vue/eslint-config-typescript": "^7.0.0",
"eslint": "^6.7.2",
"eslint-plugin-prettier": "^3.3.1",
"eslint-plugin-vue": "^6.2.2",
"lint-staged": "^9.5.0",
"prettier": "^2.2.1",
"typescript": "~4.1.5",
"vue-template-compiler": "^2.6.11"
},
"browserslist": [
"> 1%",
"last 2 versions",
"not dead"
],
"gitHooks": {
"pre-commit": "lint-staged"
},
"lint-staged": {
"*.{js,jsx,vue,ts,tsx}": [
"vue-cli-service lint",
"git add"
]
}
}

40
source/tsconfig.json Normal file
View File

@@ -0,0 +1,40 @@
{
"compilerOptions": {
"target": "esnext",
"module": "esnext",
"strict": true,
"jsx": "preserve",
"importHelpers": true,
"moduleResolution": "node",
"experimentalDecorators": true,
"skipLibCheck": true,
"esModuleInterop": true,
"allowSyntheticDefaultImports": true,
"sourceMap": true,
"baseUrl": ".",
"types": [
"webpack-env"
],
"paths": {
"@/*": [
"src/*"
]
},
"lib": [
"esnext",
"dom",
"dom.iterable",
"scripthost"
]
},
"include": [
"src/**/*.ts",
"src/**/*.tsx",
"src/**/*.vue",
"tests/**/*.ts",
"tests/**/*.tsx"
],
"exclude": [
"node_modules"
]
}

31
source/vue.config.js Normal file
View File

@@ -0,0 +1,31 @@
const ChromeManifest = require("./plugins/chrome-manifest");
const Path = require("path");
module.exports = {
publicPath: "/",
outputDir: "dist",
pages: {
popup: {
entry: "src/popup/index.ts",
template: "public/index.html",
filename: "popup.html",
title: "popup",
},
options: "src/options/index.ts",
devtools: "src/devtools/index.ts",
test: "src/test/index.ts",
},
configureWebpack: {
entry: {
content: Path.join(__dirname, "src/content.ts"),
options: Path.join(__dirname, "src/options.ts"),
},
output: {
filename: "js/[name].js?t=[hash]"
},
plugins: [
new ChromeManifest({
manifest: Path.join(__dirname, "src/manifest/index.js")
}),
]
}
};