Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
decouple renderer logic and web platform
- Loading branch information
Showing
4 changed files
with
30 additions
and
20 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,18 @@ | ||
import { createComponentRenderer } from 'web/server/create-renderer' | ||
import { createRenderer } from 'server/create-renderer' | ||
import attrs from 'web/server/modules/attrs' | ||
import klass from 'web/server/modules/class' | ||
import style from 'web/server/modules/style' | ||
import show from 'web/server/directives/show' | ||
import { isUnaryTag } from 'web/util/index' | ||
|
||
export default createComponentRenderer() | ||
export default createRenderer({ | ||
isUnaryTag, | ||
modules: { | ||
attrs, | ||
style, | ||
class: klass | ||
}, | ||
directives: { | ||
show | ||
} | ||
}) |
22 changes: 5 additions & 17 deletions
22
src/platforms/web/server/create-renderer.js → src/server/create-renderer.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters