-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(ui): 准备添加 Vue 组件,通过 JSpider 载入来实现操作
- Loading branch information
Showing
18 changed files
with
4,475 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
{ | ||
"presets": [ | ||
["env", { "modules": false }], | ||
"stage-3" | ||
] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
# /.editorconfig | ||
|
||
root = true | ||
|
||
[*] | ||
|
||
indent_style = space | ||
indent_size = 4 | ||
end_of_line = lf | ||
charset = utf-8 | ||
trim_trailing_whitespace = true | ||
insert_final_newline = true | ||
|
||
[*.md] | ||
trim_trailing_whitespace = false |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
module.exports = { | ||
env: { | ||
browser: true, | ||
es2021: true, | ||
node: true, | ||
commonjs: true, | ||
}, | ||
plugins: ['prettier'], | ||
extends: ['eslint:recommended', 'prettier', 'google'], | ||
parser: '@babel/eslint-parser', | ||
parserOptions: { | ||
ecmaVersion: 12, | ||
sourceType: 'module', | ||
requireConfigFile: false, | ||
}, | ||
rules: { | ||
'prettier/prettier': ['error'], | ||
'no-console': 0, | ||
'no-prototype-builtins': 0, // 不调用 object 本身的属性 | ||
'no-useless-escape': 0, // 正则表达式转义的时候的一个错误 | ||
'require-jsdoc': 0, | ||
'new-cap': 0, // 函数首字母不能大写 | ||
indent: 0, // prettier 已经处理好了 | ||
'object-curly-spacing': 0, // prettier 自动格式化这个部分 | ||
'max-len': ['error', 120], | ||
'operator-linebreak': ['error', 'before'], | ||
'quote-props': ['error', 'as-needed'], | ||
'operator-linebreak': 0, | ||
'no-unused-vars': 1, | ||
'space-before-function-paren': 0, // 交由 prettier 管理 | ||
}, | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
.DS_Store | ||
node_modules/ | ||
dist/ | ||
npm-debug.log | ||
yarn-error.log | ||
|
||
# Editor directories and files | ||
.idea | ||
*.suo | ||
*.ntvs* | ||
*.njsproj | ||
*.sln |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
{ | ||
"printWidth": 120, | ||
"tabWidth": 4, | ||
"useTabs": false, | ||
"endOfLine": "auto", | ||
"singleQuote": true, | ||
"semi": true, | ||
"trailingComma": "all", | ||
"bracketSpacing": true | ||
} |
Empty file.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
# jspider-ui | ||
|
||
> A Vue.js project | ||
## Build Setup | ||
|
||
```bash | ||
# install dependencies | ||
npm install | ||
|
||
# serve with hot reload at localhost:8080 | ||
npm run dev | ||
|
||
# build for production with minification | ||
npm run build | ||
``` | ||
|
||
For detailed explanation on how things work, consult the [docs for vue-loader](http://vuejs.github.io/vue-loader). |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
<!DOCTYPE html> | ||
<html lang="en"> | ||
|
||
<head> | ||
<meta charset="utf-8"> | ||
<title>jspider-vue</title> | ||
</head> | ||
|
||
<body> | ||
<div id="app"> | ||
<js-spider></js-spider> | ||
</div> | ||
|
||
</body> | ||
<script src="./lib/vue.min.js"></script> | ||
<script type='module'> | ||
import App from './dist/jspider-user-interface.js' | ||
import Mock from './lib/mock.esm.js' | ||
const Mirror = Mock.mock({ | ||
"tasks|10": [{ | ||
|
||
}] | ||
}) | ||
new Vue({ | ||
el: '#app', | ||
components: { | ||
"js-spider": App | ||
}, | ||
data: { | ||
views: Mirror | ||
} | ||
}) | ||
</script> | ||
|
||
</html> |
Large diffs are not rendered by default.
Oops, something went wrong.
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
{ | ||
"name": "@js-spider/user-interface", | ||
"description": "A Vue.js project", | ||
"version": "1.0.0", | ||
"author": "KonghaYao <20192831006@m.scnu.edu.cn>", | ||
"license": "MIT", | ||
"private": true, | ||
"main": "dist/jspider-user-interface.js", | ||
"scripts": { | ||
"dev": "rollup --config rollup.config.dev.js -w", | ||
"build": "rollup --config rollup.config.build.js" | ||
}, | ||
"browserslist": [ | ||
"> 1%", | ||
"last 2 versions", | ||
"not ie <= 8" | ||
], | ||
"devDependencies": { | ||
"@babel/core": "^7.14.3", | ||
"@babel/preset-env": "^7.14.4", | ||
"@rollup/plugin-babel": "^5.3.0", | ||
"@rollup/plugin-commonjs": "^19.0.1", | ||
"@rollup/plugin-json": "^4.1.0", | ||
"@rollup/plugin-multi-entry": "^4.0.0", | ||
"@rollup/plugin-node-resolve": "^13.0.2", | ||
"@rollup/plugin-replace": "^2.4.2", | ||
"postcss": "^8.3.5", | ||
"rollup": "^2.53.2", | ||
"rollup-plugin-delete": "^2.0.0", | ||
"rollup-plugin-license": "^2.4.0", | ||
"rollup-plugin-livereload": "^2.0.5", | ||
"rollup-plugin-postcss": "^4.0.0", | ||
"rollup-plugin-serve": "^1.1.0", | ||
"rollup-plugin-terser": "^7.0.2", | ||
"rollup-plugin-vue": "5.1.9", | ||
"vue-template-compiler": "^2.6.14" | ||
} | ||
} |
Oops, something went wrong.