Skip to content

Commit 4f95a45

Browse files
committed
feat: add laf-devops-admin packages;
1 parent e9c0aac commit 4f95a45

File tree

187 files changed

+57147
-0
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

187 files changed

+57147
-0
lines changed

packages/devops-admin/.dockerignore

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
node_modules

packages/devops-admin/.editorconfig

+14
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
# https://editorconfig.org
2+
root = true
3+
4+
[*]
5+
charset = utf-8
6+
indent_style = space
7+
indent_size = 2
8+
end_of_line = lf
9+
insert_final_newline = true
10+
trim_trailing_whitespace = true
11+
12+
[*.md]
13+
insert_final_newline = false
14+
trim_trailing_whitespace = false
+8
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
# just a flag
2+
ENV = 'development'
3+
4+
# base api
5+
VUE_APP_BASE_API = '/dev-api'
6+
7+
# app server 请求地址
8+
VUE_APP_BASE_API_APP = '/dev-api/app'

packages/devops-admin/.env.production

+8
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
# just a flag
2+
ENV = 'production'
3+
4+
# base api
5+
VUE_APP_BASE_API = '/prod-api'
6+
7+
# app server 请求地址
8+
VUE_APP_BASE_API_APP = '/prod-api/app'

packages/devops-admin/.env.staging

+10
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
NODE_ENV = production
2+
3+
# just a flag
4+
ENV = 'staging'
5+
6+
# base api
7+
VUE_APP_BASE_API = '/stage-api'
8+
9+
# app server 请求地址
10+
VUE_APP_BASE_API_APP = '/stage-api/app'

packages/devops-admin/.eslintignore

+4
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
build/*.js
2+
src/assets
3+
public
4+
dist

packages/devops-admin/.eslintrc.js

+200
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,200 @@
1+
module.exports = {
2+
root: true,
3+
parserOptions: {
4+
parser: 'babel-eslint',
5+
sourceType: 'module'
6+
},
7+
env: {
8+
browser: true,
9+
node: true,
10+
es6: true,
11+
},
12+
extends: ['plugin:vue/recommended', 'eslint:recommended'],
13+
// extends: ['plugin:vue/essential', 'eslint:recommended'],
14+
15+
16+
// add your custom rules here
17+
//it is base on https://github.com/vuejs/eslint-config-vue
18+
rules: {
19+
"vue/max-attributes-per-line": [2, {
20+
"singleline": 10,
21+
"multiline": {
22+
"max": 1,
23+
"allowFirstLine": false
24+
}
25+
}],
26+
"vue/singleline-html-element-content-newline": "off",
27+
"vue/multiline-html-element-content-newline":"off",
28+
"vue/name-property-casing": ["error", "PascalCase"],
29+
"vue/no-v-html": "off",
30+
'accessor-pairs': 2,
31+
'arrow-spacing': [2, {
32+
'before': true,
33+
'after': true
34+
}],
35+
'block-spacing': [2, 'always'],
36+
'brace-style': [2, '1tbs', {
37+
'allowSingleLine': true
38+
}],
39+
'camelcase': [0, {
40+
'properties': 'always'
41+
}],
42+
'comma-dangle': [2, 'never'],
43+
'comma-spacing': [2, {
44+
'before': false,
45+
'after': true
46+
}],
47+
'comma-style': [2, 'last'],
48+
'constructor-super': 2,
49+
'curly': [2, 'multi-line'],
50+
'dot-location': [2, 'property'],
51+
'eol-last': 2,
52+
'eqeqeq': ["error", "always", {"null": "ignore"}],
53+
'generator-star-spacing': [2, {
54+
'before': true,
55+
'after': true
56+
}],
57+
'handle-callback-err': [2, '^(err|error)$'],
58+
'indent': [2, 2, {
59+
'SwitchCase': 1
60+
}],
61+
'jsx-quotes': [2, 'prefer-single'],
62+
'key-spacing': [2, {
63+
'beforeColon': false,
64+
'afterColon': true
65+
}],
66+
'keyword-spacing': [2, {
67+
'before': true,
68+
'after': true
69+
}],
70+
'new-cap': [2, {
71+
'newIsCap': true,
72+
'capIsNew': false
73+
}],
74+
'new-parens': 2,
75+
'no-array-constructor': 2,
76+
'no-caller': 2,
77+
'no-console': 'off',
78+
'no-class-assign': 2,
79+
'no-cond-assign': 2,
80+
'no-const-assign': 2,
81+
'no-control-regex': 0,
82+
'no-delete-var': 2,
83+
'no-dupe-args': 2,
84+
'no-dupe-class-members': 2,
85+
'no-dupe-keys': 2,
86+
'no-duplicate-case': 2,
87+
'no-empty-character-class': 2,
88+
'no-empty-pattern': 2,
89+
'no-eval': 2,
90+
'no-ex-assign': 2,
91+
'no-extend-native': 2,
92+
'no-extra-bind': 2,
93+
'no-extra-boolean-cast': 2,
94+
'no-extra-parens': [2, 'functions'],
95+
'no-fallthrough': 2,
96+
'no-floating-decimal': 2,
97+
'no-func-assign': 2,
98+
'no-implied-eval': 2,
99+
'no-inner-declarations': [2, 'functions'],
100+
'no-invalid-regexp': 2,
101+
'no-irregular-whitespace': 2,
102+
'no-iterator': 2,
103+
'no-label-var': 2,
104+
'no-labels': [2, {
105+
'allowLoop': false,
106+
'allowSwitch': false
107+
}],
108+
'no-lone-blocks': 2,
109+
'no-mixed-spaces-and-tabs': 2,
110+
'no-multi-spaces': 2,
111+
'no-multi-str': 2,
112+
'no-multiple-empty-lines': [2, {
113+
'max': 1
114+
}],
115+
'no-native-reassign': 2,
116+
'no-negated-in-lhs': 2,
117+
'no-new-object': 2,
118+
'no-new-require': 2,
119+
'no-new-symbol': 2,
120+
'no-new-wrappers': 2,
121+
'no-obj-calls': 2,
122+
'no-octal': 2,
123+
'no-octal-escape': 2,
124+
'no-path-concat': 2,
125+
'no-proto': 2,
126+
'no-redeclare': 2,
127+
'no-regex-spaces': 2,
128+
'no-return-assign': [2, 'except-parens'],
129+
'no-self-assign': 2,
130+
'no-self-compare': 2,
131+
'no-sequences': 2,
132+
'no-shadow-restricted-names': 2,
133+
'no-spaced-func': 2,
134+
'no-sparse-arrays': 2,
135+
'no-this-before-super': 2,
136+
'no-throw-literal': 2,
137+
'no-trailing-spaces': 2,
138+
'no-undef': 2,
139+
'no-undef-init': 2,
140+
'no-unexpected-multiline': 2,
141+
'no-unmodified-loop-condition': 2,
142+
'no-unneeded-ternary': [2, {
143+
'defaultAssignment': false
144+
}],
145+
'no-unreachable': 2,
146+
'no-unsafe-finally': 2,
147+
'no-unused-vars': [2, {
148+
'vars': 'all',
149+
'args': 'none'
150+
}],
151+
'no-useless-call': 2,
152+
'no-useless-computed-key': 2,
153+
'no-useless-constructor': 2,
154+
'no-useless-escape': 0,
155+
'no-whitespace-before-property': 2,
156+
'no-with': 2,
157+
'one-var': [2, {
158+
'initialized': 'never'
159+
}],
160+
'operator-linebreak': [2, 'after', {
161+
'overrides': {
162+
'?': 'before',
163+
':': 'before'
164+
}
165+
}],
166+
'padded-blocks': [2, 'never'],
167+
'quotes': [2, 'single', {
168+
'avoidEscape': true,
169+
'allowTemplateLiterals': true
170+
}],
171+
'semi': [2, 'never'],
172+
'semi-spacing': [2, {
173+
'before': false,
174+
'after': true
175+
}],
176+
'space-before-blocks': [2, 'always'],
177+
'space-before-function-paren': [2, 'never'],
178+
'space-in-parens': [2, 'never'],
179+
'space-infix-ops': 2,
180+
'space-unary-ops': [2, {
181+
'words': true,
182+
'nonwords': false
183+
}],
184+
'spaced-comment': [2, 'always', {
185+
'markers': ['global', 'globals', 'eslint', 'eslint-disable', '*package', '!', ',']
186+
}],
187+
'template-curly-spacing': [2, 'never'],
188+
'use-isnan': 2,
189+
'valid-typeof': 2,
190+
'wrap-iife': [2, 'any'],
191+
'yield-star-spacing': [2, 'both'],
192+
'yoda': [2, 'never'],
193+
'prefer-const': 2,
194+
'no-debugger': process.env.NODE_ENV === 'production' ? 2 : 0,
195+
'object-curly-spacing': [2, 'always', {
196+
objectsInObjects: false
197+
}],
198+
'array-bracket-spacing': [2, 'never']
199+
}
200+
}

packages/devops-admin/.gitignore

+19
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
.DS_Store
2+
node_modules/
3+
dist/
4+
npm-debug.log*
5+
yarn-debug.log*
6+
yarn-error.log*
7+
**/*.log
8+
9+
tests/**/coverage/
10+
tests/e2e/reports
11+
selenium-debug.log
12+
13+
# Editor directories and files
14+
.idea
15+
*.suo
16+
*.ntvs*
17+
*.njsproj
18+
*.sln
19+
*.local

packages/devops-admin/.travis.yml

+5
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
language: node_js
2+
node_js: 10
3+
script: npm run test
4+
notifications:
5+
email: false
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
{
2+
"recommendations": [
3+
"octref.vetur",
4+
"dbaeumer.vscode-eslint",
5+
"eamodio.gitlens",
6+
"humao.rest-client",
7+
"yang-yue.switch-hosts",
8+
"andersonmfjr.vue-jumptotag",
9+
"sainoba.px-to-rem",
10+
"christian-kohler.npm-intellisense",
11+
"mariusalchimavicius.json-to-ts",
12+
"kisstkondoros.vscode-gutter-preview",
13+
"alefragnani.bookmarks"
14+
],
15+
"unwantedRecommendations": [
16+
"hookyqr.beautify",
17+
"dbaeumer.jshint",
18+
"ms-vscode.vscode-typescript-tslint-plugin"
19+
]
20+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,53 @@
1+
{
2+
// git
3+
"git.confirmSync": false,
4+
"git.enableSmartCommit": true,
5+
"git.autofetch": true,
6+
// editor
7+
"editor.cursorSmoothCaretAnimation": true,
8+
"editor.cursorBlinking": "expand",
9+
"editor.formatOnSave": true,
10+
"editor.formatOnType": true,
11+
"editor.tabSize": 2,
12+
"editor.suggestSelection": "first",
13+
"editor.quickSuggestions": {
14+
"strings": true
15+
},
16+
"editor.codeActionsOnSave": {
17+
"source.fixAll.eslint": true
18+
},
19+
// eslint
20+
"eslint.alwaysShowStatus": true,
21+
"eslint.format.enable": true,
22+
"eslint.run": "onSave",
23+
"eslint.codeActionsOnSave.mode": "all",
24+
// vue & vetur
25+
"[vue]": {
26+
"editor.formatOnSave": true,
27+
"editor.formatOnType": true,
28+
"editor.defaultFormatter": "dbaeumer.vscode-eslint"
29+
},
30+
"vetur.format.defaultFormatterOptions": {
31+
"prettier": {
32+
"semi": false,
33+
"singleQuote": true
34+
}
35+
},
36+
"vetur.experimental.templateInterpolationService": true, // vue template 属性提示
37+
"vetur.validation.templateProps": true,
38+
"vetur.validation.interpolation": false,
39+
// javascript
40+
"javascript.updateImportsOnFileMove.enabled": "always",
41+
"[javascript]": {
42+
"editor.formatOnSave": true,
43+
"editor.formatOnType": true,
44+
"editor.defaultFormatter": "dbaeumer.vscode-eslint"
45+
},
46+
// typescript
47+
"typescript.format.semicolons": "remove",
48+
"typescript.updateImportsOnFileMove.enabled": "always",
49+
// json
50+
"[json]": {
51+
"editor.defaultFormatter": "dbaeumer.vscode-eslint"
52+
}
53+
}

packages/devops-admin/Dockerfile

+5
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
FROM nginx:latest
2+
WORKDIR /app
3+
EXPOSE 80
4+
ADD ./nginx.conf /etc/nginx/conf.d/app.conf
5+
ADD ./dist /app/

packages/devops-admin/LICENSE

+21
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
MIT License
2+
3+
Copyright (c) 2017-present PanJiaChen
4+
5+
Permission is hereby granted, free of charge, to any person obtaining a copy
6+
of this software and associated documentation files (the "Software"), to deal
7+
in the Software without restriction, including without limitation the rights
8+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9+
copies of the Software, and to permit persons to whom the Software is
10+
furnished to do so, subject to the following conditions:
11+
12+
The above copyright notice and this permission notice shall be included in all
13+
copies or substantial portions of the Software.
14+
15+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21+
SOFTWARE.

0 commit comments

Comments
 (0)