feat: init ocsify-server-renderer
This commit is contained in:
parent
f095eb888f
commit
6dea685fee
8 changed files with 124 additions and 7 deletions
25
packages/docsify-server-renderer/index.js
Normal file
25
packages/docsify-server-renderer/index.js
Normal file
|
|
@ -0,0 +1,25 @@
|
|||
import { Compiler } from '../../src/core/render/compiler'
|
||||
import { AbstractHistory } from '../../src/core/router/history/abstract'
|
||||
import path from 'path'
|
||||
import fs from 'fs'
|
||||
|
||||
export default class Renderer {
|
||||
constructor ({
|
||||
template,
|
||||
path,
|
||||
config,
|
||||
cache
|
||||
}) {
|
||||
this.template = template
|
||||
this.path = path
|
||||
this.config = config
|
||||
this.cache = cache
|
||||
|
||||
this.router = new AbstractHistory()
|
||||
this.compiler = new Compiler(config, this.router)
|
||||
}
|
||||
|
||||
renderToString(url) {
|
||||
console.log(url)
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue