pull/2206/head
Richard Harris 7 years ago
parent 1314e8def4
commit 7cb0f8e915

@ -0,0 +1,11 @@
---
title: Compile time
---
### svelte.preprocess
TODO
### svelte.compile
TODO

@ -0,0 +1,46 @@
---
title: Run time
---
TODO
### Client-side component API
* `const component = new Component(options);`
* `component.$set(...);`
* `component.$on(event, callback);`
* `component.$destroy();`
* `component.x` if `accessors: true`
### Server-side component API
* `const result = Component.render(...)`
### svelte
* lifecycle methods, tick, context
* SSR behaviour
### svelte/store
* writable, readable, derive, get
### svelte/motion
* spring, tweened
### svelte/transition
* fade, fly, slide, draw
* crossfade...
### svelte/animation
* TODO this doesn't even exist yet
### svelte/easing
* TODO could have nice little interactive widgets showing the different functions, maybe

@ -1,59 +0,0 @@
---
title: Outline
---
(This isn't the actual documentation, this is just me getting my thoughts straight so that we can create the documentation.)
I think it makes sense to split the docs into component format (script, style, markup), compile time (`svelte.preprocess` and `svelte.compile`), then run time (component API, `svelte`, `svelte/store`, `svelte/motion`, etc). I'm not sure where template syntax, style scoping (and `:global(...)`), `context="module"` etc goes.
### Component format
* .svelte
* `<script>`
* `<style>`
* markup
* `<script context="module">`
### Compile time
* `const preprocessed = await svelte.preprocess(source, options);`
* `const result = svelte.compile(source, options);`
### Run time
#### Client-side component API
* `const component = new Component(options);`
* `component.$set(...);`
* `component.$on(event, callback);`
* `component.$destroy();`
* `component.x` if `accessors: true`
#### Server-side component API
* `const result = Component.render(...)`
#### svelte
* lifecycle methods, tick, context
* SSR behaviour
#### svelte/store
* writable, readable, derive, get
#### svelte/motion
* spring, tweened
#### svelte/transition
#### svelte/animation (TODO make this)
#### svelte/easing
Loading…
Cancel
Save