Commit 9c4132ae authored by dengxiaofeng's avatar dengxiaofeng

init civweb

parents
# editorconfig.org
root = true
[*]
charset = utf-8
end_of_line = lf
insert_final_newline = true
indent_style = space
indent_size = 2
trim_trailing_whitespace = true
[*.md]
trim_trailing_whitespace = false
const fs = require('fs');
const path = require('path');
const prettierOptions = JSON.parse(
fs.readFileSync(path.resolve(__dirname, '.prettierrc'), 'utf8'),
);
module.exports = {
parser: 'babel-eslint',
extends: ['airbnb', 'prettier', 'prettier/react'],
plugins: ['prettier', 'redux-saga', 'react', 'react-hooks', 'jsx-a11y'],
env: {
browser: true,
node: true,
es6: true,
mocha: true,
jest: true,
jasmine: true,
},
parserOptions: {
ecmaVersion: 6,
sourceType: 'module',
ecmaFeatures: {
jsx: true,
},
},
rules: {
'prettier/prettier': ['error', prettierOptions],
'arrow-body-style': [2, 'as-needed'],
'generator-star-spacing': 0,
'function-paren-newline': 0,
'class-methods-use-this': 0,
'import/imports-first': 0,
'import/newline-after-import': 0,
'import/no-dynamic-require': 0,
'import/no-extraneous-dependencies': 0,
'import/no-named-as-default': 0,
'import/no-unresolved': 2,
'import/no-webpack-loader-syntax': 0,
'import/prefer-default-export': 0,
indent: [
2,
2,
{
SwitchCase: 1,
},
],
'import/no-cycle': 0,
'no-use-before-define': ['error', { functions: false, classes: true, variables: true }],
'jsx-a11y/aria-props': 2,
'jsx-a11y/heading-has-content': 0,
'jsx-a11y/label-has-associated-control': [
2,
{
controlComponents: ['Input'],
},
],
// 'jsx-a11y/label-has-for': 0,
// 'jsx-a11y/mouse-events-have-key-events': 2,
// 'jsx-a11y/role-has-required-aria-props': 2,
// 'jsx-a11y/role-supports-aria-props': 2,
'jsx-a11y/no-noninteractive-element-interactions': 0,
'jsx-a11y/click-events-have-key-events': 0,
'jsx-a11y/no-static-element-interactions': 0,
'jsx-a11y/anchor-is-valid': 0,
'max-len': 0,
'newline-per-chained-call': 0,
'no-confusing-arrow': 0,
'no-console': 1,
'no-unused-vars': 2,
'no-use-before-define': 0,
'prefer-template': 2,
'react/jsx-wrap-multilines': 0,
'react/prop-types': 0,
'react/forbid-prop-types': 0,
'react/sort-comp': 1,
'react/jsx-one-expression-per-line': 0,
'react/jsx-props-no-spreading': 0,
'react/state-in-constructor': 0,
'react/static-property-placement': 0,
'react/destructuring-assignment': 0,
'react/no-array-index-key': 'warn',
'react-hooks/rules-of-hooks': 'error',
'react/jsx-closing-tag-location': 0,
'react/forbid-prop-types': 0,
'react/jsx-first-prop-new-line': [2, 'multiline'],
'react/jsx-filename-extension': 0,
'react/jsx-no-target-blank': 0,
'react/jsx-uses-vars': 2,
'react/require-default-props': 0,
'react/require-extension': 0,
'react/self-closing-comp': 0,
'react/sort-comp': 0,
'react/require-default-props': 0,
'react/jsx-fragments': 0,
'redux-saga/no-yield-in-race': 2,
'redux-saga/yield-effects': 2,
'require-yield': 0,
},
settings: {
'import/resolver': {
webpack: {
config: './internals/webpack/webpack.prod.babel.js',
},
},
polyfills: ['fetch', 'Promise', 'URL', 'object-assign'],
},
};
# From https://github.com/Danimoth/gitattributes/blob/master/Web.gitattributes
# Handle line endings automatically for files detected as text
# and leave all files detected as binary untouched.
* text=auto
#
# The above will handle all files NOT found below
#
#
## These files are text and should be normalized (Convert crlf => lf)
#
# source code
*.php text
*.css text
*.sass text
*.scss text
*.less text
*.styl text
*.js text eol=lf
*.coffee text
*.json text
*.htm text
*.html text
*.xml text
*.svg text
*.txt text
*.ini text
*.inc text
*.pl text
*.rb text
*.py text
*.scm text
*.sql text
*.sh text
*.bat text
# templates
*.ejs text
*.hbt text
*.jade text
*.haml text
*.hbs text
*.dot text
*.tmpl text
*.phtml text
# server config
.htaccess text
.nginx.conf text
# git config
.gitattributes text
.gitignore text
.gitconfig text
# code analysis config
.jshintrc text
.jscsrc text
.jshintignore text
.csslintrc text
# misc config
*.yaml text
*.yml text
.editorconfig text
# build config
*.npmignore text
*.bowerrc text
# Heroku
Procfile text
.slugignore text
# Documentation
*.md text
LICENSE text
AUTHORS text
#
## These files are binary and should be left untouched
#
# (binary is a macro for -text -diff)
*.png binary
*.jpg binary
*.jpeg binary
*.gif binary
*.ico binary
*.mov binary
*.mp4 binary
*.mp3 binary
*.flv binary
*.fla binary
*.swf binary
*.gz binary
*.zip binary
*.7z binary
*.ttf binary
*.eot binary
*.woff binary
*.pyc binary
*.pdf binary
# Don't check auto-generated stuff into git
coverage
build
node_modules
stats.json
.umi
.umi-production
# Cruft
.DS_Store
npm-debug.log
.idea
src/umi
.vscode
lts/dubnium
build/
node_modules/
internals/generators/
internals/scripts/
package-lock.json
yarn.lock
package.json
{
"printWidth": 80,
"tabWidth": 2,
"useTabs": false,
"semi": true,
"singleQuote": true,
"trailingComma": "all"
}
{
"processors": ["stylelint-processor-styled-components"],
"extends": [
"stylelint-config-recommended",
"stylelint-config-styled-components"
]
}
language: node_js
node_js:
- 'node'
- 'lts/*'
script:
- node ./internals/scripts/generate-templates-for-linting
- npm test -- --maxWorkers=4
- npm run build
before_install:
- export CHROME_BIN=chromium-browser
- export DISPLAY=:99.0
- sh -e /etc/init.d/xvfb start
notifications:
email:
on_failure: change
after_success: 'npm run coveralls'
cache:
directories:
- node_modules
export default {
mode: 'site',
title: '运维管理中台系统',
dynamicImport: {},
manifest: {},
hash: true,
resolve: {
includes: ['docs'],
},
styles: [
`a[title='站长统计'] { display: none; }`,
],
menus: {
'/guide': [
{
title: '介绍',
children: ['guide/index', 'guide/getting-started', 'guide/command'],
},
],
},
navs: [
null,
{ title: 'GitHub', path: 'https://g.civnet.cn:8443/test/maintenance.git' },
{ title: '更新日志', path: 'https://g.civnet.cn:8443/test/maintenance/blob/master/CHANGELOG.md' },
],
headScripts: [
'https://v1.cnzz.com/z_stat.php?id=1278602214&web_id=1278602214'
],
}
## 0.0.1 (2020-08-19)
### Bug Fixes
* git address ([7e759c5](https://g.civnet.cn:8443/test/maintenance/commits/7e759c538c424562cbba034dad4bfc80e5b30cf4))
* index.html title ([12fa65e](https://g.civnet.cn:8443/test/maintenance/commits/12fa65ebf1d99aa5d87c7683cac9bd39d4060e02))
* package.json ([f1fbec2](https://g.civnet.cn:8443/test/maintenance/commits/f1fbec2da0e59f581caed91c6914caf93d5e254f))
The MIT License (MIT)
Copyright (c) 2020 Maximilian Stoiber
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
## Quick start
1. Make sure that you have Node.js v8.15.1 and npm v5 or above installed.
2. Run `npm run setup` in order to install dependencies and clean the git repo.<br />
_At this point you can run `npm start`
## License
This project is licensed under the MIT license, Copyright (c) 2020 Maximilian
Stoiber. For more information see `LICENSE.md`.
# http://www.appveyor.com/docs/appveyor-yml
# Set build version format here instead of in the admin panel
version: '{build}'
# Do not build on gh tags
skip_tags: true
# Test against these versions of Node.js
environment:
matrix:
# Node versions to run
- nodejs_version: 'Current'
- nodejs_version: 'LTS'
# Fix line endings in Windows. (runs before repo cloning)
init:
- git config --global core.autocrlf input
# Install scripts--runs after repo cloning
install:
# Install the latest stable version of Node
- ps: Install-Product node $env:nodejs_version
- npm ci
# Disable automatic builds
build: off
# Post-install test scripts
test_script:
# Output debugging info
- node --version
- node ./internals/scripts/generate-templates-for-linting
# run tests and run build
- npm run test
- npm run build
# Cache node_modules for faster builds
cache:
- node_modules -> package.json
# remove, as appveyor doesn't support secure variables on pr builds
# so `COVERALLS_REPO_TOKEN` cannot be set, without hard-coding in this file
#on_success:
#- npm run coveralls
module.exports = {
presets: [
[
'@babel/preset-env',
{
modules: false,
},
],
'@babel/preset-react',
],
plugins: [
'styled-components',
'@babel/plugin-proposal-class-properties',
'@babel/plugin-syntax-dynamic-import',
['import', { libraryName: 'antd', style: true }]
],
env: {
production: {
only: ['src'],
plugins: [
'lodash',
'transform-react-remove-prop-types',
'@babel/plugin-transform-react-inline-elements',
'@babel/plugin-transform-react-constant-elements',
],
},
test: {
plugins: [
'@babel/plugin-transform-modules-commonjs',
'dynamic-import-node',
],
},
},
};
<ifModule mod_rewrite.c>
#######################################################################
# GENERAL #
#######################################################################
# Make apache follow sym links to files
Options +FollowSymLinks
# If somebody opens a folder, hide all files from the resulting folder list
IndexIgnore */*
#######################################################################
# REWRITING #
#######################################################################
# Enable rewriting
RewriteEngine On
# If its not HTTPS
RewriteCond %{HTTPS} off
# Comment out the RewriteCond above, and uncomment the RewriteCond below if you're using a load balancer (e.g. CloudFlare) for SSL
# RewriteCond %{HTTP:X-Forwarded-Proto} !https
# Redirect to the same URL with https://, ignoring all further rules if this one is in effect
RewriteRule ^(.*) https://%{HTTP_HOST}/$1 [R,L]
# If we get to here, it means we are on https://
# If the file with the specified name in the browser doesn't exist
RewriteCond %{REQUEST_FILENAME} !-f
# and the directory with the specified name in the browser doesn't exist
RewriteCond %{REQUEST_FILENAME} !-d
# and we are not opening the root already (otherwise we get a redirect loop)
RewriteCond %{REQUEST_FILENAME} !\/$
# Rewrite all requests to the root
RewriteRule ^(.*) /
</ifModule>
<IfModule mod_headers.c>
# Do not cache sw.js, required for offline-first updates.
<FilesMatch "sw\.js$">
Header set Cache-Control "private, no-cache, no-store, proxy-revalidate, no-transform"
Header set Pragma "no-cache"
</FilesMatch>
</IfModule>
This diff was suppressed by a .gitattributes entry.
<!doctype html><html lang="en"><head><meta charset="utf-8"><meta name="viewport" content="width=device-width,initial-scale=1"><meta name="mobile-web-app-capable" content="yes"><script src="//cdn-service.datav.aliyun.com/datav-static/2.37.6_4/libs/event.js"></script><script>window.share={event:new EventEmitter},window.umi_plugin_ant_themeVar=[{key:"dark",fileName:"dark.css",theme:"dark"},{key:"dust",fileName:"dust.css",modifyVars:{"@primary-color":"#F5222D"}},{key:"volcano",fileName:"volcano.css",modifyVars:{"@primary-color":"#FA541C"}},{key:"sunset",fileName:"sunset.css",modifyVars:{"@primary-color":"#FAAD14"}},{key:"cyan",fileName:"cyan.css",modifyVars:{"@primary-color":"#13C2C2"}},{key:"green",fileName:"green.css",modifyVars:{"@primary-color":"#52C41A"}},{key:"geekblue",fileName:"geekblue.css",modifyVars:{"@primary-color":"#2F54EB"}},{key:"purple",fileName:"purple.css",modifyVars:{"@primary-color":"#722ED1"}},{key:"dust",theme:"dark",fileName:"dark-dust.css",modifyVars:{"@primary-color":"#F5222D"}},{key:"volcano",theme:"dark",fileName:"dark-volcano.css",modifyVars:{"@primary-color":"#FA541C"}},{key:"sunset",theme:"dark",fileName:"dark-sunset.css",modifyVars:{"@primary-color":"#FAAD14"}},{key:"cyan",theme:"dark",fileName:"dark-cyan.css",modifyVars:{"@primary-color":"#13C2C2"}},{key:"green",theme:"dark",fileName:"dark-green.css",modifyVars:{"@primary-color":"#52C41A"}},{key:"geekblue",theme:"dark",fileName:"dark-geekblue.css",modifyVars:{"@primary-color":"#2F54EB"}},{key:"purple",theme:"dark",fileName:"dark-purple.css",modifyVars:{"@primary-color":"#722ED1"}}]</script></head><body><noscript>If you're seeing this message, that means <strong>JavaScript has been disabled on your browser</strong>, please <strong>enable JS</strong> to make this app work.</noscript><div id="app"></div><link href="https://fonts.googleapis.com/css?family=Open+Sans:400,700" rel="stylesheet"><script type="text/javascript" src="/runtime.6c95abf7ac0f915e0c58.js"></script><script type="text/javascript" src="/npm._ant-design_icons@4.2.2@@ant-design.287bc62ddf390b4bd0ff.chunk.js"></script><script type="text/javascript" src="/npm._ant-design_icons-svg@4.1.0@@ant-design.051181187a3bb8717be2.chunk.js"></script><script type="text/javascript" src="/npm._core-js2.6.11@core-js.8969e450c617abfa4146.chunk.js"></script><script type="text/javascript" src="/npm._antd4.6.6@antd.9df8d4cf25850f64215b.chunk.js"></script><script type="text/javascript" src="/npm._lodash4.17.20@lodash.aedb195131b82951bc6b.chunk.js"></script><script type="text/javascript" src="/npm._antd4.7.0@antd.784ee0e70995854b9c83.chunk.js"></script><script type="text/javascript" src="/npm._moment2.29.0@moment.553aaa541732e6fa7e12.chunk.js"></script><script type="text/javascript" src="/npm._core-js2.6.4@core-js.cdfe3cbc447820a72ead.chunk.js"></script><script type="text/javascript" src="/npm._ant-design_pro-layout@6.5.4@@ant-design.ffc560e69f8f1a5e7b36.chunk.js"></script><script type="text/javascript" src="/main.5eff73035bc0283a6221.chunk.js"></script></body></html>
\ No newline at end of file
This source diff could not be displayed because it is too large. You can view the blob instead.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment