Commit 84afe04b authored by duanledexianxianxian's avatar duanledexianxianxian 😁

test

parent 4bc24ec1
...@@ -84,6 +84,7 @@ const uglifyJSOptions = ...@@ -84,6 +84,7 @@ const uglifyJSOptions =
} }
: {}; : {};
export default { export default {
publicPath: "/test",
// add for transfer to umi // add for transfer to umi
plugins, plugins,
define: { define: {
...@@ -109,6 +110,12 @@ export default { ...@@ -109,6 +110,12 @@ export default {
icon: 'smile', icon: 'smile',
component: './Welcome', component: './Welcome',
}, },
{
path: '/demo',
name: 'demo',
icon: 'smile',
component: './demo',
},
], ],
}, },
], ],
......
import React from 'react';
import { connect } from 'dva';
// import styles from './index.less';
@connect()
class Index extends React.Component {
componentDidMount() {}
render() {
return (
<div className={styles.root}>
hello world
<img src="iamges/todo.png" alt="demo" />
</div>
);
}
}
export default Index;
.root {
margin-bottom: 0;
}
### 安装node
### npm配置
设置npm全局与缓存路径
```
npm config set prefix "F:\NODEJS\node_global"
npm config set cache "F:\NODEJS\node_cache"
```
查看npm配置
```
npm config list
```
设置npm镜像源
```
npm config set registry https://registry.npm.taobao.org --global
npm config set disturl https://npm.taobao.org/dist --global
```
### 安装yarn
### 安装yrm
切换仓库数据源
### 屏幕分辨率支持
1. 最低分辨率1366*768
2. 最佳分辨率 1920*1080
### package.json
```
private
如果你在包的package.json中设置"private": true,则npm会拒绝发布它。
```
### lint
1. 远程lint
2. 本地lint
1. [husky](https://github.com/typicode/husky)
`husky` 其实就是一个为 `git` 客户端增加 hook 的工具
2. [pre-commit](https://github.com/observing/pre-commit)
3. [lint-staged](https://github.com/okonet/lint-staged) 每次提交只检查本次提交所修改的文件
### 专业名词
| 英文缩写 | 英文全称 | 中文含义 |
| -------- | -------- | -------- |
| CI | | 持续集成 |
| | | |
| | | |
### 参考链接
1. lint <https://segmentfault.com/a/1190000009546913>
\ No newline at end of file
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