Commit dc65e1cd3df884de686f4ac63ac5afa4c7f7449b

Authored by jack
1 parent 4e483d5a

1.增加配置文件

.editorconfig 0 → 100644
  1 +# http://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
... ...
.env.development 0 → 100644
  1 +# just a flag
  2 +ENV = 'development'
  3 +
  4 +# base api
  5 +VUE_APP_BASE_API = '/dev-api'
  6 +
  7 +# vue-cli uses the VUE_CLI_BABEL_TRANSPILE_MODULES environment variable,
  8 +# to control whether the babel-plugin-dynamic-import-node plugin is enabled.
  9 +# It only does one thing by converting all import() to require().
  10 +# This configuration can significantly increase the speed of hot updates,
  11 +# when you have a large number of pages.
  12 +# Detail: https://github.com/vuejs/vue-cli/blob/dev/packages/@vue/babel-preset-app/index.js
  13 +
  14 +VUE_CLI_BABEL_TRANSPILE_MODULES = true
... ...
.env.production 0 → 100644
  1 +# just a flag
  2 +ENV = 'production'
  3 +
  4 +# base api
  5 +VUE_APP_BASE_API = '/prod-api'
  6 +
... ...
.env.staging 0 → 100644
  1 +NODE_ENV = production
  2 +
  3 +# just a flag
  4 +ENV = 'staging'
  5 +
  6 +# base api
  7 +VUE_APP_BASE_API = '/stage-api'
  8 +
... ...
.eslintignore 0 → 100644
  1 +build/*.js
  2 +src/assets
  3 +public
  4 +dist
... ...
.eslintrc.js 0 → 100644
  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 +
  14 + // add your custom rules here
  15 + //it is base on https://github.com/vuejs/eslint-config-vue
  16 + rules: {
  17 + "vue/max-attributes-per-line": [2, {
  18 + "singleline": 10,
  19 + "multiline": {
  20 + "max": 1,
  21 + "allowFirstLine": false
  22 + }
  23 + }],
  24 + "vue/singleline-html-element-content-newline": "off",
  25 + "vue/multiline-html-element-content-newline":"off",
  26 + "vue/name-property-casing": ["error", "PascalCase"],
  27 + "vue/no-v-html": "off",
  28 + 'accessor-pairs': 2,
  29 + 'arrow-spacing': [2, {
  30 + 'before': true,
  31 + 'after': true
  32 + }],
  33 + 'block-spacing': [2, 'always'],
  34 + 'brace-style': [2, '1tbs', {
  35 + 'allowSingleLine': true
  36 + }],
  37 + 'camelcase': [0, {
  38 + 'properties': 'always'
  39 + }],
  40 + 'comma-dangle': [2, 'never'],
  41 + 'comma-spacing': [2, {
  42 + 'before': false,
  43 + 'after': true
  44 + }],
  45 + 'comma-style': [2, 'last'],
  46 + 'constructor-super': 2,
  47 + 'curly': [2, 'multi-line'],
  48 + 'dot-location': [2, 'property'],
  49 + 'eol-last': 2,
  50 + 'eqeqeq': ["error", "always", {"null": "ignore"}],
  51 + 'generator-star-spacing': [2, {
  52 + 'before': true,
  53 + 'after': true
  54 + }],
  55 + 'handle-callback-err': [2, '^(err|error)$'],
  56 + 'indent': [2, 2, {
  57 + 'SwitchCase': 1
  58 + }],
  59 + 'jsx-quotes': [2, 'prefer-single'],
  60 + 'key-spacing': [2, {
  61 + 'beforeColon': false,
  62 + 'afterColon': true
  63 + }],
  64 + 'keyword-spacing': [2, {
  65 + 'before': true,
  66 + 'after': true
  67 + }],
  68 + 'new-cap': [2, {
  69 + 'newIsCap': true,
  70 + 'capIsNew': false
  71 + }],
  72 + 'new-parens': 2,
  73 + 'no-array-constructor': 2,
  74 + 'no-caller': 2,
  75 + 'no-console': 'off',
  76 + 'no-class-assign': 2,
  77 + 'no-cond-assign': 2,
  78 + 'no-const-assign': 2,
  79 + 'no-control-regex': 0,
  80 + 'no-delete-var': 2,
  81 + 'no-dupe-args': 2,
  82 + 'no-dupe-class-members': 2,
  83 + 'no-dupe-keys': 2,
  84 + 'no-duplicate-case': 2,
  85 + 'no-empty-character-class': 2,
  86 + 'no-empty-pattern': 2,
  87 + 'no-eval': 2,
  88 + 'no-ex-assign': 2,
  89 + 'no-extend-native': 2,
  90 + 'no-extra-bind': 2,
  91 + 'no-extra-boolean-cast': 2,
  92 + 'no-extra-parens': [2, 'functions'],
  93 + 'no-fallthrough': 2,
  94 + 'no-floating-decimal': 2,
  95 + 'no-func-assign': 2,
  96 + 'no-implied-eval': 2,
  97 + 'no-inner-declarations': [2, 'functions'],
  98 + 'no-invalid-regexp': 2,
  99 + 'no-irregular-whitespace': 2,
  100 + 'no-iterator': 2,
  101 + 'no-label-var': 2,
  102 + 'no-labels': [2, {
  103 + 'allowLoop': false,
  104 + 'allowSwitch': false
  105 + }],
  106 + 'no-lone-blocks': 2,
  107 + 'no-mixed-spaces-and-tabs': 2,
  108 + 'no-multi-spaces': 2,
  109 + 'no-multi-str': 2,
  110 + 'no-multiple-empty-lines': [2, {
  111 + 'max': 1
  112 + }],
  113 + 'no-native-reassign': 2,
  114 + 'no-negated-in-lhs': 2,
  115 + 'no-new-object': 2,
  116 + 'no-new-require': 2,
  117 + 'no-new-symbol': 2,
  118 + 'no-new-wrappers': 2,
  119 + 'no-obj-calls': 2,
  120 + 'no-octal': 2,
  121 + 'no-octal-escape': 2,
  122 + 'no-path-concat': 2,
  123 + 'no-proto': 2,
  124 + 'no-redeclare': 2,
  125 + 'no-regex-spaces': 2,
  126 + 'no-return-assign': [2, 'except-parens'],
  127 + 'no-self-assign': 2,
  128 + 'no-self-compare': 2,
  129 + 'no-sequences': 2,
  130 + 'no-shadow-restricted-names': 2,
  131 + 'no-spaced-func': 2,
  132 + 'no-sparse-arrays': 2,
  133 + 'no-this-before-super': 2,
  134 + 'no-throw-literal': 2,
  135 + 'no-trailing-spaces': 2,
  136 + 'no-undef': 2,
  137 + 'no-undef-init': 2,
  138 + 'no-unexpected-multiline': 2,
  139 + 'no-unmodified-loop-condition': 2,
  140 + 'no-unneeded-ternary': [2, {
  141 + 'defaultAssignment': false
  142 + }],
  143 + 'no-unreachable': 2,
  144 + 'no-unsafe-finally': 2,
  145 + 'no-unused-vars': [2, {
  146 + 'vars': 'all',
  147 + 'args': 'none'
  148 + }],
  149 + 'no-useless-call': 2,
  150 + 'no-useless-computed-key': 2,
  151 + 'no-useless-constructor': 2,
  152 + 'no-useless-escape': 0,
  153 + 'no-whitespace-before-property': 2,
  154 + 'no-with': 2,
  155 + 'one-var': [2, {
  156 + 'initialized': 'never'
  157 + }],
  158 + 'operator-linebreak': [2, 'after', {
  159 + 'overrides': {
  160 + '?': 'before',
  161 + ':': 'before'
  162 + }
  163 + }],
  164 + 'padded-blocks': [2, 'never'],
  165 + 'quotes': [2, 'single', {
  166 + 'avoidEscape': true,
  167 + 'allowTemplateLiterals': true
  168 + }],
  169 + 'semi': [2, 'never'],
  170 + 'semi-spacing': [2, {
  171 + 'before': false,
  172 + 'after': true
  173 + }],
  174 + 'space-before-blocks': [2, 'always'],
  175 + 'space-before-function-paren': [2, 'never'],
  176 + 'space-in-parens': [2, 'never'],
  177 + 'space-infix-ops': 2,
  178 + 'space-unary-ops': [2, {
  179 + 'words': true,
  180 + 'nonwords': false
  181 + }],
  182 + 'spaced-comment': [2, 'always', {
  183 + 'markers': ['global', 'globals', 'eslint', 'eslint-disable', '*package', '!', ',']
  184 + }],
  185 + 'template-curly-spacing': [2, 'never'],
  186 + 'use-isnan': 2,
  187 + 'valid-typeof': 2,
  188 + 'wrap-iife': [2, 'any'],
  189 + 'yield-star-spacing': [2, 'both'],
  190 + 'yoda': [2, 'never'],
  191 + 'prefer-const': 2,
  192 + 'no-debugger': process.env.NODE_ENV === 'production' ? 2 : 0,
  193 + 'object-curly-spacing': [2, 'always', {
  194 + objectsInObjects: false
  195 + }],
  196 + 'array-bracket-spacing': [2, 'never']
  197 + }
  198 +}
... ...
.gitignore
1   -*.class
2   -*.scss
3   -classes
4   -node_modules
  1 +.DS_Store
  2 +node_modules/
  3 +dist/
  4 +npm-debug.log*
  5 +yarn-debug.log*
  6 +yarn-error.log*
  7 +package-lock.json
  8 +tests/**/coverage/
  9 +
  10 +# Editor directories and files
  11 +.idea
  12 +.vscode
  13 +*.suo
  14 +*.ntvs*
  15 +*.njsproj
  16 +*.sln
... ...
.travis.yml 0 → 100644
  1 +language: node_js
  2 +node_js: 10
  3 +script: npm run test
  4 +notifications:
  5 + email: false
... ...
package-lock.json
... ... @@ -6312,7 +6312,8 @@
6312 6312 "ansi-regex": {
6313 6313 "version": "2.1.1",
6314 6314 "bundled": true,
6315   - "dev": true
  6315 + "dev": true,
  6316 + "optional": true
6316 6317 },
6317 6318 "aproba": {
6318 6319 "version": "1.2.0",
... ... @@ -6333,12 +6334,14 @@
6333 6334 "balanced-match": {
6334 6335 "version": "1.0.0",
6335 6336 "bundled": true,
6336   - "dev": true
  6337 + "dev": true,
  6338 + "optional": true
6337 6339 },
6338 6340 "brace-expansion": {
6339 6341 "version": "1.1.11",
6340 6342 "bundled": true,
6341 6343 "dev": true,
  6344 + "optional": true,
6342 6345 "requires": {
6343 6346 "balanced-match": "^1.0.0",
6344 6347 "concat-map": "0.0.1"
... ... @@ -6353,17 +6356,20 @@
6353 6356 "code-point-at": {
6354 6357 "version": "1.1.0",
6355 6358 "bundled": true,
6356   - "dev": true
  6359 + "dev": true,
  6360 + "optional": true
6357 6361 },
6358 6362 "concat-map": {
6359 6363 "version": "0.0.1",
6360 6364 "bundled": true,
6361   - "dev": true
  6365 + "dev": true,
  6366 + "optional": true
6362 6367 },
6363 6368 "console-control-strings": {
6364 6369 "version": "1.1.0",
6365 6370 "bundled": true,
6366   - "dev": true
  6371 + "dev": true,
  6372 + "optional": true
6367 6373 },
6368 6374 "core-util-is": {
6369 6375 "version": "1.0.2",
... ... @@ -6480,7 +6486,8 @@
6480 6486 "inherits": {
6481 6487 "version": "2.0.4",
6482 6488 "bundled": true,
6483   - "dev": true
  6489 + "dev": true,
  6490 + "optional": true
6484 6491 },
6485 6492 "ini": {
6486 6493 "version": "1.3.5",
... ... @@ -6492,6 +6499,7 @@
6492 6499 "version": "1.0.0",
6493 6500 "bundled": true,
6494 6501 "dev": true,
  6502 + "optional": true,
6495 6503 "requires": {
6496 6504 "number-is-nan": "^1.0.0"
6497 6505 }
... ... @@ -6506,6 +6514,7 @@
6506 6514 "version": "3.0.4",
6507 6515 "bundled": true,
6508 6516 "dev": true,
  6517 + "optional": true,
6509 6518 "requires": {
6510 6519 "brace-expansion": "^1.1.7"
6511 6520 }
... ... @@ -6513,12 +6522,14 @@
6513 6522 "minimist": {
6514 6523 "version": "0.0.8",
6515 6524 "bundled": true,
6516   - "dev": true
  6525 + "dev": true,
  6526 + "optional": true
6517 6527 },
6518 6528 "minipass": {
6519 6529 "version": "2.9.0",
6520 6530 "bundled": true,
6521 6531 "dev": true,
  6532 + "optional": true,
6522 6533 "requires": {
6523 6534 "safe-buffer": "^5.1.2",
6524 6535 "yallist": "^3.0.0"
... ... @@ -6537,6 +6548,7 @@
6537 6548 "version": "0.5.1",
6538 6549 "bundled": true,
6539 6550 "dev": true,
  6551 + "optional": true,
6540 6552 "requires": {
6541 6553 "minimist": "0.0.8"
6542 6554 }
... ... @@ -6626,7 +6638,8 @@
6626 6638 "number-is-nan": {
6627 6639 "version": "1.0.1",
6628 6640 "bundled": true,
6629   - "dev": true
  6641 + "dev": true,
  6642 + "optional": true
6630 6643 },
6631 6644 "object-assign": {
6632 6645 "version": "4.1.1",
... ... @@ -6638,6 +6651,7 @@
6638 6651 "version": "1.4.0",
6639 6652 "bundled": true,
6640 6653 "dev": true,
  6654 + "optional": true,
6641 6655 "requires": {
6642 6656 "wrappy": "1"
6643 6657 }
... ... @@ -6723,7 +6737,8 @@
6723 6737 "safe-buffer": {
6724 6738 "version": "5.1.2",
6725 6739 "bundled": true,
6726   - "dev": true
  6740 + "dev": true,
  6741 + "optional": true
6727 6742 },
6728 6743 "safer-buffer": {
6729 6744 "version": "2.1.2",
... ... @@ -6759,6 +6774,7 @@
6759 6774 "version": "1.0.2",
6760 6775 "bundled": true,
6761 6776 "dev": true,
  6777 + "optional": true,
6762 6778 "requires": {
6763 6779 "code-point-at": "^1.0.0",
6764 6780 "is-fullwidth-code-point": "^1.0.0",
... ... @@ -6778,6 +6794,7 @@
6778 6794 "version": "3.0.1",
6779 6795 "bundled": true,
6780 6796 "dev": true,
  6797 + "optional": true,
6781 6798 "requires": {
6782 6799 "ansi-regex": "^2.0.0"
6783 6800 }
... ... @@ -6821,12 +6838,14 @@
6821 6838 "wrappy": {
6822 6839 "version": "1.0.2",
6823 6840 "bundled": true,
6824   - "dev": true
  6841 + "dev": true,
  6842 + "optional": true
6825 6843 },
6826 6844 "yallist": {
6827 6845 "version": "3.1.1",
6828 6846 "bundled": true,
6829   - "dev": true
  6847 + "dev": true,
  6848 + "optional": true
6830 6849 }
6831 6850 }
6832 6851 },
... ... @@ -12821,7 +12840,8 @@
12821 12840 "version": "4.0.8",
12822 12841 "resolved": "https://registry.npmjs.org/rx-lite/-/rx-lite-4.0.8.tgz",
12823 12842 "integrity": "sha1-Cx4Rr4vESDbwSmQH6S2kJGe3lEQ=",
12824   - "dev": true
  12843 + "dev": true,
  12844 + "optional": true
12825 12845 },
12826 12846 "rx-lite-aggregates": {
12827 12847 "version": "4.0.8",
... ...