1 Star 0 Fork 0

百度开源 / san-ssr

Create your Gitee Account
Explore and code with more than 6 million developers,Free private repositories !:)
Sign up
This repository doesn't specify license. Without author's permission, this code is only for learning and cannot be used for other purposes.
Clone or Download
Cancel
Notice: Creating folder will generate an empty file .keep, because not support in Git
Loading...
README.en.md

San SSR

npm version downloads Build Status Coveralls semantic-release GitHub issues David David Dev DUB license Commitizen friendly

The purpurse of this repo is to provide an SSR framework and utils for the san components.

Usage

The SanProject class is used to compile component files into ssr render function.

const { SanProject } = require('san-ssr')
const app = require('src/component.js')

const project = new SanProject()
const render = project.compileToRenderer(app)

console.log(render({name: 'harttle'}))

See API doc SanProject for details, or refer to the demo project in /demo directory.

Working with San

Supported san versions for each release are specified by peerDependencies, that means you'll need both san and san-ssr installed in case you need server side rendering. And it's considered compatible as long as you don't see any UNMET warning.

Note: As described in baidu/san/issues/441, a minor version in san implies possible BREAKING CHANGES, thus the peerDependency is specified via tilde version.

Other Target Platforms

san-ssr provides static analysis for San components and generates abstract component tree, while code generation is a separated process, which is provided by specific implementations:

Repository Comments ( 0 )

Sign in to post a comment

About

No description expand collapse
Cancel

Releases

No release

Contributors

All

Activities

Load More
can not load any more
1
https://git.oschina.net/baidu/san-ssr.git
git@git.oschina.net:baidu/san-ssr.git
baidu
san-ssr
san-ssr
master

Search