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