no message
Former-commit-id: 6834a1ab45d50c74d4df660acc5ce5d0ac12ec9d Former-commit-id: 0aeaa818124f2c3ab496f4cf3e051634912b2dc4 Former-commit-id: 9dee2e7b7f8f9925bf97bd2dea0bf9f917e98a3d
This commit is contained in:
@@ -29,6 +29,7 @@
|
|||||||
"mockjs": "^1.0.1-beta3",
|
"mockjs": "^1.0.1-beta3",
|
||||||
"papaparse": "^4.3.6",
|
"papaparse": "^4.3.6",
|
||||||
"particles.js": "^2.0.0",
|
"particles.js": "^2.0.0",
|
||||||
|
"path-posix": "^1.0.0",
|
||||||
"quill": "^1.3.4",
|
"quill": "^1.3.4",
|
||||||
"simplemde": "^1.11.2",
|
"simplemde": "^1.11.2",
|
||||||
"timeago.js": "^3.0.2",
|
"timeago.js": "^3.0.2",
|
||||||
|
|||||||
@@ -2,21 +2,22 @@ import Vue from 'vue'
|
|||||||
import VueRouter from 'vue-router'
|
import VueRouter from 'vue-router'
|
||||||
import Cookies from 'js-cookie'
|
import Cookies from 'js-cookie'
|
||||||
|
|
||||||
import _path from 'path'
|
// import _path from 'path'
|
||||||
|
import _path2 from 'path-posix'
|
||||||
import _get from 'lodash.get'
|
import _get from 'lodash.get'
|
||||||
import _replace from 'lodash.replace'
|
// import _replace from 'lodash.replace'
|
||||||
|
|
||||||
console.log(_path)
|
console.log(_path2)
|
||||||
|
|
||||||
Vue.use(VueRouter)
|
Vue.use(VueRouter)
|
||||||
|
|
||||||
const maker = ({publicPath, namePrefix, req}) => {
|
const maker = ({publicPath, namePrefix, req}) => {
|
||||||
return req.keys().map(req).map(page => {
|
return req.keys().map(req).map(page => {
|
||||||
const pageRegExp = new RegExp(`${_path.sep}page${_path.sep}`, 'g')
|
const pageRegExp = new RegExp(`${_path2.sep}page${_path2.sep}`, 'g')
|
||||||
const path = _path.dirname(page.default.__file)
|
const path = _path2.dirname(page.default.__file)
|
||||||
.replace(publicPath, '')
|
.replace(publicPath, '')
|
||||||
.replace(pageRegExp, _path.sep)
|
.replace(pageRegExp, _path2.sep)
|
||||||
const name = namePrefix + path.split(_path.sep).join('-').replace(/-page-/g, '-')
|
const name = namePrefix + path.split(_path2.sep).join('-').replace(/-page-/g, '-')
|
||||||
return {
|
return {
|
||||||
path: `${path}${_get(page, 'router.pathSuffix', '')}`,
|
path: `${path}${_get(page, 'router.pathSuffix', '')}`,
|
||||||
name,
|
name,
|
||||||
|
|||||||
Reference in New Issue
Block a user