Skip to content

Commit

Permalink
Migrate to roadhog@2 (#542)
Browse files Browse the repository at this point in the history
* migrate to roadhog@2

* config html for src/index.ejs
  • Loading branch information
sorrycc authored and ddcat1115 committed Jan 5, 2018
1 parent cfa27b1 commit c6cf634
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 11 deletions.
5 changes: 3 additions & 2 deletions .roadhogrc β†’ .webpackrc
Original file line number Diff line number Diff line change
@@ -1,9 +1,7 @@
{
"entry": "src/index.js",
"extraBabelPlugins": [
"transform-runtime",
"transform-decorators-legacy",
"transform-class-properties",
["import", { "libraryName": "antd", "libraryDirectory": "es", "style": true }]
],
"env": {
Expand All @@ -15,5 +13,8 @@
},
"ignoreMomentLocale": true,
"theme": "./src/theme.js",
"html": {
"template": "./src/index.ejs"
},
"hash": true
}
10 changes: 5 additions & 5 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@
"private": true,
"scripts": {
"precommit": "npm run lint-staged",
"start": "roadhog server",
"start:no-proxy": "cross-env NO_PROXY=true roadhog server",
"start": "roadhog dev",
"start:no-proxy": "cross-env NO_PROXY=true roadhog dev",
"build": "roadhog build",
"site": "roadhog-api-doc static && gh-pages -d dist",
"analyze": "roadhog build --analyze",
Expand All @@ -21,8 +21,8 @@
},
"dependencies": {
"@antv/data-set": "^0.8.0",
"@babel/polyfill": "^7.0.0-beta.36",
"antd": "^3.1.0",
"babel-polyfill": "^6.26.0",
"babel-runtime": "^6.9.2",
"bizcharts": "^3.1.0-beta.4",
"bizcharts-plugin-slider": "^2.0.1",
Expand All @@ -47,7 +47,7 @@
"devDependencies": {
"babel-eslint": "^8.0.1",
"babel-jest": "^22.0.4",
"babel-plugin-dva-hmr": "^0.4.0",
"babel-plugin-dva-hmr": "^0.4.1",
"babel-plugin-import": "^1.2.1",
"babel-plugin-transform-class-properties": "^6.24.1",
"babel-plugin-transform-decorators-legacy": "^1.3.4",
Expand Down Expand Up @@ -76,7 +76,7 @@
"pro-download": "^1.0.0",
"react-test-renderer": "^16.0.0",
"redbox-react": "^1.3.2",
"roadhog": "^1.3.1",
"roadhog": "^2.0.0-0",
"roadhog-api-doc": "^0.3.3",
"rollbar": "^2.3.1",
"stylelint": "^8.1.0",
Expand Down
2 changes: 1 addition & 1 deletion src/index.ejs
Original file line number Diff line number Diff line change
Expand Up @@ -13,4 +13,4 @@
<div id="root"></div>
</body>

</html>
</html>
6 changes: 3 additions & 3 deletions src/index.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import 'babel-polyfill';
import '@babel/polyfill';
import dva from 'dva';
import 'moment/locale/zh-cn';
import FastClick from 'fastclick';
Expand All @@ -17,10 +17,10 @@ const app = dva({
// app.use({});

// 3. Register global model
app.model(require('./models/global'));
app.model(require('./models/global').default);

// 4. Router
app.router(require('./router'));
app.router(require('./router').default);

// 5. Start
app.start('#root');
Expand Down

0 comments on commit c6cf634

Please sign in to comment.