From 5010dfa23dd2e83ab314a2ea21a6fc627e2fd276 Mon Sep 17 00:00:00 2001 From: SunnyQjm Date: Sat, 26 Oct 2019 22:14:46 +0800 Subject: [PATCH] init --- .editorconfig | 16 ++++++++++++++++ .env | 2 ++ .eslintrc | 3 +++ .gitignore | 18 ++++++++++++++++++ .prettierignore | 7 +++++++ .prettierrc | 11 +++++++++++ .umirc.ts | 39 +++++++++++++++++++++++++++++++++++++++ 7 files changed, 96 insertions(+) create mode 100755 .editorconfig create mode 100644 .env create mode 100755 .eslintrc create mode 100755 .gitignore create mode 100644 .prettierignore create mode 100644 .prettierrc create mode 100644 .umirc.ts diff --git a/.editorconfig b/.editorconfig new file mode 100755 index 0000000..7e3649a --- /dev/null +++ b/.editorconfig @@ -0,0 +1,16 @@ +# http://editorconfig.org +root = true + +[*] +indent_style = space +indent_size = 2 +end_of_line = lf +charset = utf-8 +trim_trailing_whitespace = true +insert_final_newline = true + +[*.md] +trim_trailing_whitespace = false + +[Makefile] +indent_style = tab diff --git a/.env b/.env new file mode 100644 index 0000000..847f6f8 --- /dev/null +++ b/.env @@ -0,0 +1,2 @@ +BROWSER=none +ESLINT=1 diff --git a/.eslintrc b/.eslintrc new file mode 100755 index 0000000..f626954 --- /dev/null +++ b/.eslintrc @@ -0,0 +1,3 @@ +{ + "extends": "eslint-config-umi" +} diff --git a/.gitignore b/.gitignore new file mode 100755 index 0000000..7d50fdf --- /dev/null +++ b/.gitignore @@ -0,0 +1,18 @@ +# See https://help.github.com/articles/ignoring-files/ for more about ignoring files. + +# dependencies +/node_modules +/npm-debug.log* +/yarn-error.log +/yarn.lock +/package-lock.json + +# production +/dist + +# misc +.DS_Store + +# umi +.umi +.umi-production diff --git a/.prettierignore b/.prettierignore new file mode 100644 index 0000000..2098c78 --- /dev/null +++ b/.prettierignore @@ -0,0 +1,7 @@ +**/*.md +**/*.svg +**/*.ejs +**/*.html +package.json +.umi +.umi-production diff --git a/.prettierrc b/.prettierrc new file mode 100644 index 0000000..d3698d4 --- /dev/null +++ b/.prettierrc @@ -0,0 +1,11 @@ +{ + "singleQuote": true, + "trailingComma": "all", + "printWidth": 100, + "overrides": [ + { + "files": ".prettierrc", + "options": { "parser": "json" } + } + ] +} diff --git a/.umirc.ts b/.umirc.ts new file mode 100644 index 0000000..0656a95 --- /dev/null +++ b/.umirc.ts @@ -0,0 +1,39 @@ +import { IConfig } from 'umi-types'; + +// ref: https://umijs.org/config/ +const config: IConfig = { + treeShaking: true, + // routes: [ + // { + // path: '/', + // component: '../layouts/index', + // routes: [ + // { path: '/', component: '../pages/index' } + // ] + // } + // ], + plugins: [ + // ref: https://umijs.org/plugin/umi-plugin-react.html + ['umi-plugin-react', { + antd: true, + dva: true, + dynamicImport: { webpackChunkName: true }, + title: 'sunny-blog', + dll: false, + + routes: { + exclude: [ + /models\//, + /services\//, + /model\.(t|j)sx?$/, + /service\.(t|j)sx?$/, + /components\//, + ], + }, + }], + ], + sass: {}, + disableCSSModules: true +}; + +export default config;