feat: init ocsify-server-renderer

This commit is contained in:
qingwei.li 2017-05-29 22:24:38 +08:00 • committed by cinwell.li
commit 6dea685fee
8 changed files with 124 additions and 7 deletions

View 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)
}
}