Commit Graph
5 Commits
Author SHA1 Message Date
Renée Kooi bfb31f475b Add gitignore inside example/ (#641)
* Add gitignore inside example/

`"example"` is in the `"files"` key in our package.json, which overrides
the root .gitignore and ends up including the entire examples folder,
including its dist/ and node_modules/. That means a fresh install of
choo comes in at over 100MB of unused code.

Nested .gitignores still apply to folders that are specified in the
`files` key, so this pushes choo back down to a <500KB installed size :)
The example code itself is still included so folks can use it as
offline documentation.

* also ignore package-lock.json
2018-03-08 23:31:31 +01:00
Renée Kooi 6bee7086bc Use new mount() functionality in example (#630)
No more mucking around with `module.parent` ✌️
2018-02-23 19:39:28 +01:00
Renée Kooi 8937832d5f 6.8.0 2018-02-14 12:52:44 +01:00
Renée Kooi a23dc51397 server: Store mount selector and return this (#625)
* Store mount selector and return `this`

This allows `.mount('body')` to be used on the server like so:

```js
module.exports = app.mount('body')
```

Then, when server rendering you can do:

```js
var app = require('./app')
fillServerTemplate(html, app.selector, app.toString('/'))
```

Where `fillServerTemplate` is a function that replaces the HTML at a
CSS selector with some string.

This way you do not need to check for `typeof window` in your
application entry point to do server rendering, and it allows tools like
bankai to automatically inline server rendered html in the correct place.

* docs

* better words
2018-02-13 22:09:08 +01:00
Renée Kooi 2576e2d9ed update repo url (#594) 2017-10-31 12:36:06 +01:00