Add barebones description of `svelte/register`

I don't know if this is correct, but it works for me and this is better than nothing.
pull/2633/head
Jon Ross 5 years ago committed by GitHub
parent d419274afd
commit df602b74b0
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -558,8 +558,17 @@ You can see a full example on the [animations tutorial](tutorial/animate)
### `svelte/register`
TODO
To render Svelte components server-side, use `require('svelte/register')`; after this, you can use `require` to include any `.svelte` file.
```js
require('svelte/register');
const App = require('./App.svelte');
...
App.default.render({ title: 'name' });
```
### Client-side component API
@ -569,8 +578,6 @@ TODO
const component = new Component(options)
```
---
A client-side component — that is, a component compiled with `generate: 'dom'` (or the `generate` option left unspecified) is a JavaScript class.
```js

Loading…
Cancel
Save