Commit c6cf6343 authored by chencheng (云谦)'s avatar chencheng (云谦) Committed by ddcat1115

Migrate to roadhog@2 (#542)

* migrate to roadhog@2

* config html for src/index.ejs
parent cfa27b18
{ {
"entry": "src/index.js", "entry": "src/index.js",
"extraBabelPlugins": [ "extraBabelPlugins": [
"transform-runtime",
"transform-decorators-legacy", "transform-decorators-legacy",
"transform-class-properties",
["import", { "libraryName": "antd", "libraryDirectory": "es", "style": true }] ["import", { "libraryName": "antd", "libraryDirectory": "es", "style": true }]
], ],
"env": { "env": {
...@@ -15,5 +13,8 @@ ...@@ -15,5 +13,8 @@
}, },
"ignoreMomentLocale": true, "ignoreMomentLocale": true,
"theme": "./src/theme.js", "theme": "./src/theme.js",
"html": {
"template": "./src/index.ejs"
},
"hash": true "hash": true
} }
...@@ -5,8 +5,8 @@ ...@@ -5,8 +5,8 @@
"private": true, "private": true,
"scripts": { "scripts": {
"precommit": "npm run lint-staged", "precommit": "npm run lint-staged",
"start": "roadhog server", "start": "roadhog dev",
"start:no-proxy": "cross-env NO_PROXY=true roadhog server", "start:no-proxy": "cross-env NO_PROXY=true roadhog dev",
"build": "roadhog build", "build": "roadhog build",
"site": "roadhog-api-doc static && gh-pages -d dist", "site": "roadhog-api-doc static && gh-pages -d dist",
"analyze": "roadhog build --analyze", "analyze": "roadhog build --analyze",
...@@ -21,8 +21,8 @@ ...@@ -21,8 +21,8 @@
}, },
"dependencies": { "dependencies": {
"@antv/data-set": "^0.8.0", "@antv/data-set": "^0.8.0",
"@babel/polyfill": "^7.0.0-beta.36",
"antd": "^3.1.0", "antd": "^3.1.0",
"babel-polyfill": "^6.26.0",
"babel-runtime": "^6.9.2", "babel-runtime": "^6.9.2",
"bizcharts": "^3.1.0-beta.4", "bizcharts": "^3.1.0-beta.4",
"bizcharts-plugin-slider": "^2.0.1", "bizcharts-plugin-slider": "^2.0.1",
...@@ -47,7 +47,7 @@ ...@@ -47,7 +47,7 @@
"devDependencies": { "devDependencies": {
"babel-eslint": "^8.0.1", "babel-eslint": "^8.0.1",
"babel-jest": "^22.0.4", "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-import": "^1.2.1",
"babel-plugin-transform-class-properties": "^6.24.1", "babel-plugin-transform-class-properties": "^6.24.1",
"babel-plugin-transform-decorators-legacy": "^1.3.4", "babel-plugin-transform-decorators-legacy": "^1.3.4",
...@@ -76,7 +76,7 @@ ...@@ -76,7 +76,7 @@
"pro-download": "^1.0.0", "pro-download": "^1.0.0",
"react-test-renderer": "^16.0.0", "react-test-renderer": "^16.0.0",
"redbox-react": "^1.3.2", "redbox-react": "^1.3.2",
"roadhog": "^1.3.1", "roadhog": "^2.0.0-0",
"roadhog-api-doc": "^0.3.3", "roadhog-api-doc": "^0.3.3",
"rollbar": "^2.3.1", "rollbar": "^2.3.1",
"stylelint": "^8.1.0", "stylelint": "^8.1.0",
......
import 'babel-polyfill'; import '@babel/polyfill';
import dva from 'dva'; import dva from 'dva';
import 'moment/locale/zh-cn'; import 'moment/locale/zh-cn';
import FastClick from 'fastclick'; import FastClick from 'fastclick';
...@@ -17,10 +17,10 @@ const app = dva({ ...@@ -17,10 +17,10 @@ const app = dva({
// app.use({}); // app.use({});
// 3. Register global model // 3. Register global model
app.model(require('./models/global')); app.model(require('./models/global').default);
// 4. Router // 4. Router
app.router(require('./router')); app.router(require('./router').default);
// 5. Start // 5. Start
app.start('#root'); app.start('#root');
......
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