{"size": 661, "ext": "js", "max_stars_repo_path": "src/page/app.js", "max_stars_repo_name": "wafersystems/dva-wafer-initial", "max_stars_repo_stars_event_min_datetime": "2018-11-29T07:39:22.000Z", "max_stars_repo_stars_event_max_datetime": "2018-11-29T07:39:22.000Z", "max_issues_repo_path": "src/page/app.js", "max_issues_repo_name": "wafersystems/dva-wafer-initial", "max_issues_repo_issues_event_min_datetime": null, "max_issues_repo_issues_event_max_datetime": null, "max_forks_repo_path": "src/page/app.js", "max_forks_repo_name": "wafersystems/dva-wafer-initial", "max_forks_repo_forks_event_min_datetime": null, "max_forks_repo_forks_event_max_datetime": null}
{"max_stars_count": 1, "max_issues_count": null, "max_forks_count": null, "avg_line_length": 21.3225806452, "max_line_length": 57, "alphanum_fraction": 0.6989409985}
import dva from 'dva';
import 'intl';
import { addLocaleData } from 'react-intl';
import './index.less';
import createHistory from 'history/createBrowserHistory';
import createLoading from 'dva-loading';
import * as I18n from '../i18n/index';
import { CHINESE, ENGLISH } from '../utils/constant';

require('es6-promise').polyfill();

addLocaleData(I18n[CHINESE]);
addLocaleData(I18n[ENGLISH]);

// 1. Initialize
const app = dva({
  history: createHistory(),
});

// 2. Plugins
app.use(createLoading());

// 3. Model
app.model(require('../models/i18n').default);

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

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