mirror of https://github.com/Kylart/KawAnime.git
implemented babel-eslint parsing for dynamic import for standard
This commit is contained in:
parent
5b54ff6534
commit
6bb2bcd46f
2
.babelrc
2
.babelrc
|
@ -8,7 +8,7 @@
|
|||
"env": {
|
||||
"test": {
|
||||
"presets": ["env", "stage-2"],
|
||||
"plugins": [ "istanbul" ]
|
||||
"plugins": ["istanbul", "syntax-dynamic-import"]
|
||||
}
|
||||
}
|
||||
}
|
|
@ -59,8 +59,10 @@
|
|||
"devDependencies": {
|
||||
"autoprefixer": "^7.1.1",
|
||||
"ava": "^0.19.1",
|
||||
"babel-eslint": "^7.2.3",
|
||||
"babel-loader": "^7.0.0",
|
||||
"babel-plugin-add-module-exports": "^0.2.1",
|
||||
"babel-plugin-syntax-dynamic-import": "^6.18.0",
|
||||
"babel-plugin-transform-runtime": "^6.22.0",
|
||||
"babel-polyfill": "^6.23.0",
|
||||
"babel-preset-env": "^1.3.2",
|
||||
|
@ -73,7 +75,7 @@
|
|||
"cross-env": "^5.0.0",
|
||||
"css-loader": "^0.28.4",
|
||||
"electron": "^1.7.5",
|
||||
"electron-builder": "^17.1.1",
|
||||
"electron-builder": "^17.10.0",
|
||||
"env2": "^2.2.0",
|
||||
"es6-promise": "^4.1.0",
|
||||
"eslint-plugin-vue": "^2.0.1",
|
||||
|
@ -125,9 +127,9 @@
|
|||
}
|
||||
},
|
||||
"standard": {
|
||||
"parser": "babel-eslint",
|
||||
"ignore": [
|
||||
"test/front.test.js",
|
||||
"router/index.js",
|
||||
"public"
|
||||
]
|
||||
},
|
||||
|
|
|
@ -17,7 +17,7 @@ function route (path, view) {
|
|||
Vue.use(Router)
|
||||
|
||||
export function createRouter () {
|
||||
const router = new Router({
|
||||
return new Router({
|
||||
base: __dirname,
|
||||
mode: 'history',
|
||||
scrollBehavior: () => ({y: 0}),
|
||||
|
@ -32,15 +32,4 @@ export function createRouter () {
|
|||
{path: '*', redirect: '/'} // TODO: make a custom 404 page
|
||||
]
|
||||
})
|
||||
|
||||
// Send a pageview to Google Analytics
|
||||
router.beforeEach((to, from, next) => {
|
||||
if (typeof ga !== 'undefined') {
|
||||
ga('set', 'page', to.path)
|
||||
ga('send', 'pageview')
|
||||
}
|
||||
next()
|
||||
})
|
||||
|
||||
return router
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue