Skip to content

Commit 77068aa

Browse files
author
yunkui.zhou
committed
initial
0 parents  commit 77068aa

16 files changed

+11594
-0
lines changed

.babelrc

+7
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
{
2+
"presets": ["env", "react"],
3+
"plugins": [
4+
"transform-class-properties", //解析类属性,静态和实例的属性
5+
"syntax-dynamic-import"//不解析动态加载标识符 import()
6+
]
7+
}

.gitignore

+5
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
.idea/
2+
.DS_Store/
3+
.git/
4+
node_modules/
5+
dist/

.npmrc

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
registry=http://npm.bkjk-inc.com

bin/www.js

+9
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
/**
2+
* Created by ink on 2018/3/31.
3+
*/
4+
import app from '../server/index'
5+
import http from 'http'
6+
const server = http.createServer(app)
7+
server.listen('8888', () => {
8+
console.log('启动成功,监听端口:8888')
9+
})

build.sh

+2
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
#!/usr/bin/env bash
2+
cp -R public/ dist/public/

client/App.js

+14
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
/**
2+
* Created by ink on 2018/3/29.
3+
*/
4+
import React from 'react'
5+
6+
const App = (props) => {
7+
return <React.Fragment>
8+
<div>d大时代</div>
9+
<div>2233</div>
10+
<div>3</div>
11+
<div>4</div>
12+
</React.Fragment>
13+
}
14+
export default App

client/index.js

+7
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
/**
2+
* Created by ink on 2018/3/29.
3+
*/
4+
import React from 'react'
5+
import ReactDom from 'react-dom'
6+
import App from './App'
7+
ReactDom.hydrate(<App/>, document.getElementById('layout'))

nodemon.json

+18
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
{
2+
"verbose": true,
3+
"ignore": [
4+
".git",
5+
"node_modules/",
6+
".idea",
7+
"client/",
8+
"./webpack.*.js"
9+
],
10+
"execMap": {
11+
},
12+
"env": {
13+
"LOCAL_ENV": "local_env"
14+
},
15+
"watch": [
16+
"server/"
17+
]
18+
}

0 commit comments

Comments
 (0)