Skip to content

Commit

Permalink
README
Browse files Browse the repository at this point in the history
  • Loading branch information
zhangxf26 authored and zhangxf26 committed Dec 31, 2024
1 parent 70968b7 commit 9d1c491
Show file tree
Hide file tree
Showing 56 changed files with 15,332 additions and 13,234 deletions.
13 changes: 4 additions & 9 deletions .editorconfig
Original file line number Diff line number Diff line change
@@ -1,16 +1,11 @@
# http://editorconfig.org
# 🎨 editorconfig.org

root = true

[*]
charset = utf-8
end_of_line = lf
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
10 changes: 0 additions & 10 deletions .env

This file was deleted.

16 changes: 16 additions & 0 deletions .env.beta
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
NODE_ENV = 'production'

PUBLIC_URL = '.'

// 离线包目录
BUILD_PATH = 'offline-beta'

// 是否使用sourcemap
GENERATE_SOURCEMAP=false

// 使用扩展 eslint
EXTEND_ESLINT = false

CI = false

SKIP_PREFLIGHT_CHECK=true
10 changes: 0 additions & 10 deletions .env.development

This file was deleted.

16 changes: 16 additions & 0 deletions .env.prod
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
NODE_ENV = 'production'

PUBLIC_URL = '.'

// 离线包目录
BUILD_PATH = 'offline-prod'

// 是否使用sourcemap
GENERATE_SOURCEMAP=false

// 使用扩展 eslint
EXTEND_ESLINT = false

CI = false

SKIP_PREFLIGHT_CHECK=true
10 changes: 0 additions & 10 deletions .env.production

This file was deleted.

16 changes: 3 additions & 13 deletions .eslintignore
Original file line number Diff line number Diff line change
@@ -1,13 +1,3 @@
/build
/deploy
/src/setupProxy.js
craco.config.js
.*.js
!.*.js
~*
es/**/*
lib/**/*
node_modules
dist
coverage
**/*.d.ts
build/
**/node_modules
coverage/
6 changes: 6 additions & 0 deletions .eslintrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
{
"extends": ["react-app"],
"rules": {
"react-hooks/exhaustive-deps": "off"
}
}
23 changes: 0 additions & 23 deletions .eslintrc.js

This file was deleted.

1 change: 0 additions & 1 deletion .gitattributes

This file was deleted.

9 changes: 5 additions & 4 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,17 +1,18 @@
# See https://help.github.com/articles/ignoring-files/ for more about ignoring files.

# dependencies
**/node_modules
/node_modules
/.pnp
.pnp.js

# testing
/coverage

.eslintcache

# production
/build

/.vscode
/offline-beta
/offline-prod

# misc
.DS_Store
Expand Down
4 changes: 0 additions & 4 deletions .husky/pre-commit

This file was deleted.

38 changes: 20 additions & 18 deletions .prettierignore
Original file line number Diff line number Diff line change
@@ -1,21 +1,23 @@
/build
**/node_modules
package.json
.eslintignore
.editorconfig
**/*.png
**/*.svg
lib/
es/
dist/
build/
coverage/
CNAME
LICENSE
yarn.lock
package-lock.json
netlify.toml
yarn-error.log
*.sh
*.snap
.gitignore
.prettierignore
.gitattributes
.env
.env.development
.env.production
.DS_Store
LICENSE
.eslintcache
**/*.svg
**/*.jpg
**/*.jpeg
**/*.png
**/*.gif
**/*.ico
*.lock
.editorconfig
.eslintignore
**/*.yml
*.html
CHANGELOG.*.md
8 changes: 5 additions & 3 deletions .prettierrc
Original file line number Diff line number Diff line change
@@ -1,9 +1,11 @@
{
"singleQuote":true,
"trailingComma": "all",
"singleQuote": true,
"jsxSingleQuote": false,
"trailingComma": "none",
"printWidth": 100,
"proseWrap": "never",
"arrowParens": "avoid",
"importOrder": ["^(react|react-dom)$", "^([a-z]|@[a-z])", "", ".*"],
"plugins": ["@ianvs/prettier-plugin-sort-imports"],
"overrides": [
{
"files": ".prettierrc",
Expand Down
22 changes: 0 additions & 22 deletions .stylelintrc.json

This file was deleted.

10 changes: 6 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
# [react-startup 脚手架](https://github.com/rt-zhangxuefei/react-startup)
# Tips
# React 项目脚手架精简版
保持 React, React Router, Redux, CRACO 版本更新

# LICENCE
异步action使用redux官方推荐的thunk方式

MIT
追求简洁,易用,减少各种心智负担

不追求大而全,作为一个基础的模板,在这个上面可以搭建业务项目
50 changes: 17 additions & 33 deletions craco.config.js
Original file line number Diff line number Diff line change
@@ -1,41 +1,25 @@
const { BundleAnalyzerPlugin } = require('webpack-bundle-analyzer');
const AntdDayjsWebpackPlugin = require('antd-dayjs-webpack-plugin');
// const CracoLessPlugin = require('craco-less');
const CracoAntDesignPlugin = require('craco-antd');
const WebpackBar = require('webpackbar');
const ESLintPlugin = require('eslint-webpack-plugin');
const path = require('path');

// Don't open the browser during development
process.env.BROWSER = 'none';
const CracoLessPlugin = require('craco-less');

module.exports = {
devServer: {
port: 3001
},
webpack: {
plugins: [
new WebpackBar({ profile: true }),
...(process.env.NODE_ENV === 'development'
? [new BundleAnalyzerPlugin({ openAnalyzer: false, analyzerPort: 8888 })]
: []),
new ESLintPlugin(),
new AntdDayjsWebpackPlugin(),
],
alias: {
'@': require('path').resolve(__dirname, 'src')
}
},
plugins: [
// {
// plugin: CracoLessPlugin,
// options: {
// lessLoaderOptions: {
// lessOptions: {
// javascriptEnabled: true,
// },
// },
// },
// },
{
plugin: CracoAntDesignPlugin,
plugin: CracoLessPlugin,
options: {
customizeThemeLessPath: path.join(__dirname, 'src/style/antd/customTheme.less'),
},
},
],
lessLoaderOptions: {
lessOptions: {
modifyVars: {},
javascriptEnabled: true
}
}
}
}
]
};
Loading

0 comments on commit 9d1c491

Please sign in to comment.