mirror of
https://github.com/wahyd4/docsify.git
synced 2026-08-10 05:48:18 +10:00
Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
e160bcaded | ||
|
|
8cf69754b5 | ||
|
|
79a83bc17d | ||
|
|
81c87f7926 | ||
|
|
67ec128315 | ||
|
|
77657e3b64 | ||
|
|
9825db47af |
@@ -27,6 +27,7 @@
|
||||
- Multiple themes
|
||||
- Useful plugin API
|
||||
- Compatible with IE10+
|
||||
- Support SSR
|
||||
|
||||
## Quick start
|
||||
|
||||
|
||||
+7
-11
@@ -1,21 +1,17 @@
|
||||
var rollup = require('rollup')
|
||||
var babel = require('rollup-plugin-babel')
|
||||
var buble = require('rollup-plugin-buble')
|
||||
var async = require('rollup-plugin-async')
|
||||
var isProd = process.argv[process.argv.length - 1] !== '--dev'
|
||||
|
||||
rollup
|
||||
.rollup({
|
||||
entry: 'packages/docsify-server-renderer/index.js',
|
||||
plugins: [
|
||||
babel({
|
||||
plugins: ['transform-async-to-generator'],
|
||||
presets: [
|
||||
[
|
||||
'es2015',
|
||||
{
|
||||
modules: false
|
||||
}
|
||||
]
|
||||
]
|
||||
async(),
|
||||
buble({
|
||||
transforms: {
|
||||
generator: false
|
||||
}
|
||||
})
|
||||
],
|
||||
onwarn: function() {}
|
||||
|
||||
+1
-1
@@ -2741,7 +2741,7 @@ function getPath () {
|
||||
}
|
||||
|
||||
var isAbsolutePath = cached(function (path) {
|
||||
return /(:|(\/{2}))/.test(path)
|
||||
return /(:|(\/{2}))/g.test(path)
|
||||
});
|
||||
|
||||
var getParentPath = cached(function (path) {
|
||||
|
||||
Vendored
+1
-1
File diff suppressed because one or more lines are too long
+2
-4
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "docsify",
|
||||
"version": "4.1.2",
|
||||
"version": "4.1.4",
|
||||
"description": "A magical documentation generator.",
|
||||
"author": {
|
||||
"name": "qingwei-li",
|
||||
@@ -35,8 +35,6 @@
|
||||
"zoom-image": "^0.1.4"
|
||||
},
|
||||
"devDependencies": {
|
||||
"babel-plugin-transform-async-to-generator": "^6.24.1",
|
||||
"babel-preset-es2015": "^6.24.1",
|
||||
"cssnano": "^3.10.0",
|
||||
"eslint": "^3.18.0",
|
||||
"eslint-config-vue": "^2.0.2",
|
||||
@@ -45,7 +43,7 @@
|
||||
"postcss": "^5.2.16",
|
||||
"postcss-salad": "^1.0.8",
|
||||
"rollup": "^0.41.6",
|
||||
"rollup-plugin-babel": "^2.7.1",
|
||||
"rollup-plugin-async": "^1.2.0",
|
||||
"rollup-plugin-buble": "^0.15.0",
|
||||
"rollup-plugin-commonjs": "^8.0.2",
|
||||
"rollup-plugin-node-resolve": "^2.0.0",
|
||||
|
||||
@@ -5,6 +5,7 @@ import { Compiler } from '../../src/core/render/compiler'
|
||||
import { isAbsolutePath } from '../../src/core/router/util'
|
||||
import { readFileSync } from 'fs'
|
||||
import { resolve, basename } from 'path'
|
||||
import resolvePathname from 'resolve-pathname'
|
||||
|
||||
function cwd (...args) {
|
||||
return resolve(process.cwd(), ...args)
|
||||
@@ -131,7 +132,7 @@ export default class Renderer {
|
||||
|
||||
const fileName = basename(filePath)
|
||||
|
||||
return await this._loadFile(cwd(filePath, '../..', fileName))
|
||||
return await this._loadFile(resolvePathname(`../${fileName}`, filePath))
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "docsify-server-renderer",
|
||||
"version": "4.1.2",
|
||||
"version": "4.1.4",
|
||||
"description": "docsify server renderer",
|
||||
"author": {
|
||||
"name": "qingwei-li",
|
||||
|
||||
@@ -36,7 +36,7 @@ export function getPath (...args) {
|
||||
}
|
||||
|
||||
export const isAbsolutePath = cached(path => {
|
||||
return /(:|(\/{2}))/.test(path)
|
||||
return /(:|(\/{2}))/g.test(path)
|
||||
})
|
||||
|
||||
export const getParentPath = cached(path => {
|
||||
|
||||
Reference in New Issue
Block a user