mirror of
https://github.com/YMFE/yapi.git
synced 2024-12-09 05:00:30 +08:00
添加ykit
This commit is contained in:
parent
e14f22c94b
commit
b1043111f0
26507
build/index.js
Normal file
26507
build/index.js
Normal file
File diff suppressed because it is too large
Load Diff
@ -2,7 +2,7 @@ import React, { Component } from 'react'
|
||||
import Routes from './routes'
|
||||
import './styles/cs.scss'
|
||||
// import './styles/cs.less'
|
||||
console.log(4444)
|
||||
console.log(55555)
|
||||
|
||||
class App extends Component {
|
||||
render() {
|
||||
|
@ -5,7 +5,7 @@ export default _ => {
|
||||
return (
|
||||
<acticle>
|
||||
<Header />
|
||||
<h3>首页</h3>
|
||||
<h3>首页3333</h3>
|
||||
</acticle>
|
||||
)
|
||||
}
|
25677
dev/scripts/index.js
Normal file
25677
dev/scripts/index.js
Normal file
File diff suppressed because it is too large
Load Diff
1
dev/scripts/index.js.map
Normal file
1
dev/scripts/index.js.map
Normal file
File diff suppressed because one or more lines are too long
15
dev/styles/index.css
Normal file
15
dev/styles/index.css
Normal file
@ -0,0 +1,15 @@
|
||||
body {
|
||||
background-color: #f2f2f2;
|
||||
}
|
||||
|
||||
.app{
|
||||
position: absolute;
|
||||
top: 50%;
|
||||
left: 0;
|
||||
width: 100%;
|
||||
color: #444;
|
||||
text-align: center;
|
||||
margin: -70px 0 0;
|
||||
}
|
||||
|
||||
/*# sourceMappingURL=index.css.map*/
|
1
dev/styles/index.css.map
Normal file
1
dev/styles/index.css.map
Normal file
@ -0,0 +1 @@
|
||||
{"version":3,"file":"styles/index.css","sources":[],"mappings":";;;;;;;;;;;;;","sourceRoot":""}
|
@ -7,6 +7,6 @@
|
||||
</head>
|
||||
<body>
|
||||
<div id="yapi"></div>
|
||||
<script src="./build/index.js"></script>
|
||||
<script src="./dev/scripts/index.js"></script>
|
||||
</body>
|
||||
</html>
|
||||
|
@ -1,7 +1,7 @@
|
||||
{
|
||||
"name": "yapi",
|
||||
"version": "1.0.0",
|
||||
"description": "-------------------------------------------------------------------------------- #### **项目管理**: #### *PMO*:(http://pmo.corp.qunar.com)<br /> -------------------------------------------------------------------------------- #### **CI/CD**: #### *QDR*:(http://qdr.corp.qunar.com/)<br /> #### *QCI*:(http://qci.corp.qunar.com/)<br /> #### *CABLE*:(http://wanshiwu.corp.qunar.com/qualitycheck/index/)<br />",
|
||||
"description": "YAPI",
|
||||
"main": "index.js",
|
||||
"scripts": {
|
||||
"start": "webpack-dev-server"
|
||||
@ -24,7 +24,10 @@
|
||||
"koa-static": "^3.0.0",
|
||||
"koa-views": "^5.2.0",
|
||||
"mongoose": "4.10.8",
|
||||
"mongoose-auto-increment": "^5.0.1"
|
||||
"mongoose-auto-increment": "^5.0.1",
|
||||
"ykit-config-antd": "^0.1.3",
|
||||
"ykit-config-es6": "^0.4.0",
|
||||
"ykit-config-react": "^0.4.4"
|
||||
},
|
||||
"devDependencies": {
|
||||
"axios": "^0.16.2",
|
||||
|
13
src/scripts/App.js
Normal file
13
src/scripts/App.js
Normal file
@ -0,0 +1,13 @@
|
||||
import React, { Component } from 'react'
|
||||
import Routes from './routes'
|
||||
// import '../..//styles/cs.scss'
|
||||
// import './styles/cs.less'
|
||||
console.log(555)
|
||||
|
||||
class App extends Component {
|
||||
render() {
|
||||
return <Routes />
|
||||
}
|
||||
}
|
||||
|
||||
export default App
|
8
src/scripts/index.js
Normal file
8
src/scripts/index.js
Normal file
@ -0,0 +1,8 @@
|
||||
import React from 'react'
|
||||
import ReactDOM from 'react-dom'
|
||||
import App from './App'
|
||||
|
||||
ReactDOM.render(
|
||||
<App />,
|
||||
document.getElementById('yapi')
|
||||
)
|
11
src/scripts/routes.js
Normal file
11
src/scripts/routes.js
Normal file
@ -0,0 +1,11 @@
|
||||
import React from 'react'
|
||||
import { BrowserRouter as Router, Route, Link } from 'react-router-dom'
|
||||
import { Home } from '../../client/containers/index'
|
||||
|
||||
export default store => {
|
||||
return (
|
||||
<Router>
|
||||
<Route path="/" component={ Home } />
|
||||
</Router>
|
||||
)
|
||||
}
|
13
src/styles/index.css
Normal file
13
src/styles/index.css
Normal file
@ -0,0 +1,13 @@
|
||||
body {
|
||||
background-color: #f2f2f2;
|
||||
}
|
||||
|
||||
.app{
|
||||
position: absolute;
|
||||
top: 50%;
|
||||
left: 0;
|
||||
width: 100%;
|
||||
color: #444;
|
||||
text-align: center;
|
||||
margin: -70px 0 0;
|
||||
}
|
22
ykit.js
Normal file
22
ykit.js
Normal file
@ -0,0 +1,22 @@
|
||||
module.exports = {
|
||||
plugins: ['react', 'es6', 'antd'],
|
||||
devtool: 'cheap-source-map',
|
||||
config: {
|
||||
exports: [
|
||||
'./scripts/index.js',
|
||||
'./styles/index.css'
|
||||
],
|
||||
modifyWebpackConfig: function(baseConfig) {
|
||||
// edit ykit's Webpack configs
|
||||
baseConfig.watch = true;
|
||||
console.log(baseConfig)
|
||||
return baseConfig;
|
||||
}
|
||||
},
|
||||
server: {
|
||||
hot: true, // true/false,默认 false,效果相当于 ykit server --hot
|
||||
overlay: true // true/false,默认 false,开启后可在当前打开的页面提示打包错误
|
||||
},
|
||||
hooks: {},
|
||||
commands: []
|
||||
};
|
Loading…
Reference in New Issue
Block a user