Skip to content

Commit 944dcdd

Browse files
committed
Initial commit
0 parents  commit 944dcdd

File tree

13 files changed

+313
-0
lines changed

13 files changed

+313
-0
lines changed

.babelrc

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
{
2+
"plugins": [
3+
["import", {
4+
"libraryName": "antd",
5+
"style": "css"
6+
}]
7+
],
8+
"presets": ["react", "env", "stage-1"]
9+
}

.editorconfig

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
# editorconfig.org
2+
root = true
3+
4+
[*]
5+
indent_style = space
6+
indent_size = 2
7+
end_of_line = lf
8+
charset = utf-8
9+
trim_trailing_whitespace = true
10+
insert_final_newline = true
11+
12+
[*.md]
13+
trim_trailing_whitespace = false

.eslintrc

Lines changed: 63 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,63 @@
1+
{
2+
"extends": [
3+
"eslint:recommended",
4+
"plugin:import/errors",
5+
"plugin:import/warnings"
6+
],
7+
"plugins": [
8+
"react"
9+
],
10+
"parser": "babel-eslint",
11+
"env": {
12+
"es6": true,
13+
"browser": true,
14+
"node": true,
15+
"mocha": true
16+
},
17+
"rules": {
18+
"quotes": 0,
19+
"no-console": 1,
20+
"no-debugger": 1,
21+
"no-var": 1,
22+
"semi": [1, "always"],
23+
"no-trailing-spaces": 0,
24+
"eol-last": 0,
25+
"no-unused-vars": 0,
26+
"no-underscore-dangle": 0,
27+
"no-alert": 0,
28+
"no-lone-blocks": 0,
29+
"jsx-quotes": 1,
30+
"react/display-name": [ 1, {"ignoreTranspilerName": false }],
31+
"react/forbid-prop-types": [1, {"forbid": ["any"]}],
32+
"react/jsx-boolean-value": 1,
33+
"react/jsx-closing-bracket-location": 0,
34+
"react/jsx-curly-spacing": 1,
35+
"react/jsx-indent-props": 0,
36+
"react/jsx-key": 1,
37+
"react/jsx-max-props-per-line": 0,
38+
"react/jsx-no-bind": 1,
39+
"react/jsx-no-duplicate-props": 1,
40+
"react/jsx-no-literals": 0,
41+
"react/jsx-no-undef": 1,
42+
"react/jsx-pascal-case": 1,
43+
"react/jsx-sort-prop-types": 0,
44+
"react/jsx-sort-props": 0,
45+
"react/jsx-uses-react": 1,
46+
"react/jsx-uses-vars": 1,
47+
"react/jsx-wrap-multilines": 1,
48+
"react/no-danger": 1,
49+
"react/no-did-mount-set-state": 1,
50+
"react/no-did-update-set-state": 1,
51+
"react/no-direct-mutation-state": 1,
52+
"react/no-multi-comp": 0,
53+
"react/no-set-state": 0,
54+
"react/no-unknown-property": 1,
55+
"react/prefer-es6-class": 1,
56+
"react/prop-types": 1,
57+
"react/react-in-jsx-scope": 1,
58+
"react/self-closing-comp": 1,
59+
"react/sort-comp": 1,
60+
"import/no-named-as-default" : 0,
61+
"import/extensions": 1
62+
}
63+
}

.gitignore

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
# See https://help.github.com/ignore-files/ for more about ignoring files.
2+
3+
# dependencies
4+
/node_modules
5+
6+
#IDE
7+
/.idea
8+
9+
#production
10+
/dist
11+
12+
# misc
13+
.DS_Store
14+
.env.local
15+
.env.development.local
16+
.env.test.local
17+
.env.production.local
18+
19+
npm-debug.log*
20+
yarn-debug.log*
21+
yarn-error.log*

README.md

Whitespace-only changes.

package.json

Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
{
2+
"name": "react2",
3+
"version": "0.1.0",
4+
"private": true,
5+
"scripts": {
6+
"lint": "node_modules/.bin/eslint webpack.config.* src tools",
7+
"clean-dist": "npm run remove-dist && mkdir dist",
8+
"remove-dist": "node_modules/.bin/rimraf ./dist",
9+
"prebuild": "npm-run-all clean-dist lint",
10+
"build": "babel-node tools/build.js"
11+
},
12+
"dependencies": {
13+
"antd": "2.13.6",
14+
"babel-polyfill": "^6.26.0",
15+
"react": "15.6.2",
16+
"react-dom": "15.6.2",
17+
"react-scripts": "1.0.14"
18+
},
19+
"devDependencies": {
20+
"babel-cli": "^6.26.0",
21+
"babel-core": "^6.26.0",
22+
"babel-loader": "^7.1.2",
23+
"babel-plugin-import": "^1.6.2",
24+
"babel-preset-env": "^1.6.1",
25+
"babel-preset-react": "^6.24.1",
26+
"babel-preset-stage-1": "^6.24.1",
27+
"babel-register": "^6.26.0",
28+
"colors": "^1.1.2",
29+
"css-loader": "^0.28.7",
30+
"eslint": "4.9.0",
31+
"eslint-plugin-import": "2.8.0",
32+
"eslint-plugin-react": "7.4.0",
33+
"extract-text-webpack-plugin": "^3.0.1",
34+
"file-loader": "^1.1.5",
35+
"npm-run-all": "^4.1.1",
36+
"rimraf": "^2.6.2",
37+
"style-loader": "^0.19.0",
38+
"url-loader": "^0.6.2",
39+
"webpack": "^3.8.1"
40+
}
41+
}

src/components/App.js

Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
import React, { Component } from 'react';
2+
3+
import { Layout, Menu, Breadcrumb } from 'antd';
4+
const { Header, Content, Footer } = Layout;
5+
6+
class App extends Component {
7+
render() {
8+
return (
9+
<Layout className="layout">
10+
<Header>
11+
<div className="logo" />
12+
<Menu
13+
theme="dark"
14+
mode="horizontal"
15+
defaultSelectedKeys={['2']}
16+
style={{ lineHeight: '64px' }}
17+
>
18+
<Menu.Item key="1">nav 1</Menu.Item>
19+
<Menu.Item key="2">nav 2</Menu.Item>
20+
<Menu.Item key="3">nav 3</Menu.Item>
21+
</Menu>
22+
</Header>
23+
<Content style={{ padding: '0 50px' }}>
24+
<Breadcrumb style={{ margin: '16px 0' }}>
25+
<Breadcrumb.Item>Home</Breadcrumb.Item>
26+
<Breadcrumb.Item>List</Breadcrumb.Item>
27+
<Breadcrumb.Item>App</Breadcrumb.Item>
28+
</Breadcrumb>
29+
<div style={{ background: '#fff', padding: 24, minHeight: 280 }}>Content</div>
30+
</Content>
31+
<Footer style={{ textAlign: 'center' }}>
32+
Ant Design ©2016 Created by Ant UED
33+
</Footer>
34+
</Layout>
35+
);
36+
}
37+
}
38+
39+
export default App;

src/favicon.ico

3.78 KB
Binary file not shown.

src/index.csp

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
<!DOCTYPE html>
2+
<html lang="en">
3+
<head>
4+
<meta charset="utf-8">
5+
<meta http-equiv="X-UA-Compatible" content="IE=edge">
6+
<meta name="viewport" content="width=device-width, initial-scale=1.0">
7+
<link rel="stylesheet" href="style.css">
8+
<title>Сахалинский областной медицинский информационно-аналитический центр</title>
9+
</head>
10+
<body>
11+
<div id="app"></div>
12+
<script src="./bundle.js"></script>
13+
</body>
14+
</html>

src/index.js

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
import React from 'react';
2+
import ReactDOM from 'react-dom';
3+
import App from './components/App';
4+
import './index.csp';
5+
6+
ReactDOM.render(<App />, document.getElementById('app'));

0 commit comments

Comments
 (0)