Commit 12d8b407 authored by afc163's avatar afc163

Add fastclick

parent 838d8418
...@@ -26,6 +26,7 @@ ...@@ -26,6 +26,7 @@
"core-js": "^2.5.1", "core-js": "^2.5.1",
"dva": "^2.1.0", "dva": "^2.1.0",
"enquire-js": "^0.1.1", "enquire-js": "^0.1.1",
"fastclick": "^1.0.6",
"g-cloud": "^1.0.2-beta", "g-cloud": "^1.0.2-beta",
"g2": "^2.3.13", "g2": "^2.3.13",
"g2-plugin-slider": "^1.2.1", "g2-plugin-slider": "^1.2.1",
...@@ -84,14 +85,27 @@ ...@@ -84,14 +85,27 @@
"nightmare": "^2.10.0" "nightmare": "^2.10.0"
}, },
"babel": { "babel": {
"presets": ["env", "react"], "presets": [
"plugins": ["transform-decorators-legacy", "transform-class-properties"] "env",
"react"
],
"plugins": [
"transform-decorators-legacy",
"transform-class-properties"
]
}, },
"jest": { "jest": {
"setupFiles": ["<rootDir>/tests/setupTests.js"], "setupFiles": [
"testMatch": ["**/?(*.)(spec|test|e2e).js?(x)"], "<rootDir>/tests/setupTests.js"
],
"testMatch": [
"**/?(*.)(spec|test|e2e).js?(x)"
],
"setupTestFrameworkScriptFile": "<rootDir>/tests/jasmine.js", "setupTestFrameworkScriptFile": "<rootDir>/tests/jasmine.js",
"moduleFileExtensions": ["js", "jsx"], "moduleFileExtensions": [
"js",
"jsx"
],
"moduleNameMapper": { "moduleNameMapper": {
"\\.(css|less)$": "<rootDir>/tests/styleMock.js" "\\.(css|less)$": "<rootDir>/tests/styleMock.js"
} }
...@@ -100,5 +114,9 @@ ...@@ -100,5 +114,9 @@
"**/*.{js,jsx}": "lint-staged:js", "**/*.{js,jsx}": "lint-staged:js",
"**/*.less": "stylelint --syntax less" "**/*.less": "stylelint --syntax less"
}, },
"browserslist": ["> 1%", "last 2 versions", "not ie <= 10"] "browserslist": [
"> 1%",
"last 2 versions",
"not ie <= 10"
]
} }
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 './g2'; import './g2';
import './rollbar'; import './rollbar';
import onError from './error'; import onError from './error';
...@@ -23,3 +24,4 @@ app.router(require('./router')); ...@@ -23,3 +24,4 @@ app.router(require('./router'));
// 5. Start // 5. Start
app.start('#root'); app.start('#root');
FastClick.attach(document.body);
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