Commit Graph
194 Commits
Author SHA1 Message Date
Carl Törnqvist 6513f4288f Add hash option (#667)
* Add hash option

* Avoid unecessary scroll into view-call

* Update readme with hash option

* Fix typo

* Remove nanolocation dep

* Default hash option to true
2018-07-12 11:29:31 +02:00
Carl Törnqvist 65d124b352 Add documentation on components (#673)
* Add documentation on components

* Fix typo
2018-07-10 14:40:51 +02:00
Ayush Gupta 0650e642d4 Update README.md (#669) 2018-06-25 12:48:57 -07:00
Renée Kooi 983f33637f Update bel and yo-yoify references in docs to nanohtml. (#660) 2018-06-05 15:58:08 +02:00
Yoshua Wuyts 5610b78505 show total downloads (#640) 2018-03-08 20:11:32 +01:00
Arve Knudsen a685d4ee36 Fix typos in the README (#629) 2018-02-15 12:02:21 +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
alex 3bb4c1571c Fix docs for popState (#626)
Resolves https://github.com/choojs/choo/issues/621
2018-02-13 10:43:02 +01:00
Moszeed 242128bb8c add support for HTMLElement on choo.mount (#597)
* add support for HTMLElement on choo.mount

- removed explicit "string" test and for selector variable, replaced by
"is available and filled" test
- add "if" to separate by incoming "string" or "HTMLElement"

* remove semicolons and white spaces

* add "is in Browser" check for HTMLElement

* add window to HTMLElement

* optimizing "mount" commit

* remove window.HTMLElement check

* change .mount documentation

- add info that selector can be also a DOM element
- remove "nanomount" infos

* add missing line
2017-11-15 12:44:45 +01:00
Jeff Wainwright ec38a5ce58 🚂 Readme tweaks (#598) 2017-11-13 11:14:04 +01:00
Yerko Palma d1c845cbe6 fix docs (#592) 2017-10-31 12:24:43 +01:00
Yoshua Wuyts 5561566dd5 add initial state support (#574)
* add initial state support

* clean up initial state from window

* fix initial state if none
2017-10-20 16:30:58 +02:00
Yoshua Wuyts 92372b9bff use .storeName during tracing (#560) 2017-10-03 12:34:36 -04:00
Maciej Sitko db07336845 Update README.md (#569)
* Update README.md

* Update README.md
2017-09-26 20:31:25 +01:00
Hendrik fd22637318 Add link to Reddit. (#566) 2017-09-20 16:55:46 +02:00
Daijiro Wachi 643daf54b1 update transferred repository links (#540) 2017-08-02 14:06:47 +02:00
Yoshua Wuyts 9c8c5b3c85 Save location (#534)
* add location

* remove zopfli from build

* state.location -> state.href

* add state.href docs
2017-07-26 19:31:15 +02:00
Yoshua Wuyts 586cdf9ae9 update nanohref (#522) 2017-07-03 10:48:38 +02:00
Yoshua Wuyts 38a875a0d6 add DOMTitleChange event (#525) 2017-07-03 10:43:44 +02:00
Yoshua Wuyts 5d2104963c remove default route, parse qs (#521) 2017-06-29 17:20:00 +02:00
Yoshua Wuyts 89e27dc512 add state to overview 2017-06-28 16:06:02 +02:00
Yoshua Wuyts eb9b7fd59f v6 beta branch (#489)
* become prototype based

upgrade to new nanobus

remove nanohistory

add nanotiming

remove nanomount

move newTree to next tick

upgrade timing API

add more node warnings to .start/.mount

add morph timing

pass app instance to .use()

self-clearing async-timing

clean up timings

better mount error

fix mount bug

de-prototype helper functions

update to latest nanotiming

upgrade to nanotiming 5

update nanotiming

add toString asserts

more assertions

add event based tracing

expose createlocation

assert return types from render to always be the same

add navigate event

expose route on state

expose events

update uglify

use scroll-to-anchor

update nanobus

document events

update docs

more docs

changelog v6

upgrade nanomorph

fixup! neatify morph assertions

update bel dep

add popstate docs to changelog

* expose events on state

* upgrade deps
2017-06-28 15:53:37 +02:00
Charlotte Spencer fc92f8eaad docs(README): fix emitter typo (#517) 2017-06-21 17:25:44 +01:00
Emil Bay 736e4b4514 Add hook for replaceState (#494)
* Add hook for replaceState

* Clarify why replaceState is dangerous
2017-05-19 14:56:45 +02:00
Emil Bay fe7f3a1695 Allow listeners to attach before rendering (#493)
* Allow listeners to attach before rendering

* Move rerender listeners down. Subtle sequencing

* Update docs to reflect changes
2017-05-19 14:20:39 +02:00
Irina Shestak 2faba85b84 describe dat data-no-routing attr (#474) 2017-04-13 16:41:09 +02:00
Richard Smith-Unna b5ed2f3828 Clarify app.use() emitter event usage (solves #470) (#472)
* Explain DOMContentLoaded significance in API docs

* Clarify `app.use()` emitter event usage

* Typo
2017-04-11 14:36:27 +02:00
Yoshua Wuyts 5f09e11f08 tweak philo even a lil more 2017-04-07 22:22:47 +02:00
Yoshua Wuyts a43eca0778 tweak philosophy slightly 2017-04-07 22:21:40 +02:00
Yoshua Wuyts 281b351d42 fix nanoframework reference 2017-04-03 03:53:17 +02:00
Mathias Buus bccd2db942 fix typo (#457) 2017-03-31 11:22:59 +02:00
Todd Kennedy 5b4083adfd DOC: Note app.mount replaces target with tree (#449)
Make sure users are aware of potential issue with removal of node.
2017-03-29 11:04:24 +02:00
Yoshua Wuyts 4ef1f411b5 add timing API support (#448)
* add timing API support

* fixup! bump package.json
2017-03-29 10:43:42 +02:00
Brecht Savelkoul 0f755f010f Use npm-installed requires in README example (#442) 2017-03-25 10:09:23 +01:00
Feross Aboukhadijeh 0b8cf55987 Fix standardjs.com link (#435) 2017-03-23 09:51:12 +01:00
Yoshua Wuyts 9aba28c57a more API docs for choo v5 (#432)
* more API docs for choo v5

* change handbook link
2017-03-21 16:56:33 +01:00
Yoshua Wuyts 8e8e870d45 implement choo v5 API (#425)
* implement choo v5 API

* fix tests

* 5.0.0-3

* 4kb now

* bump nanomorph

* 5.0.0-4

* fix missing deps stuff

* 5.0.0-5

* fix travis

* fixup! oops standard

* chooexpose

* fix state passing

* fixup! update example

* fixup! incorporate feedback

* fixup! more docs

* fixup! even more docs
2017-03-21 03:00:45 +01:00
Pål Ruud f84ec43fa5 Update README reflecting API changes (#397) 2017-02-07 14:02:32 +01:00
Yoshua Wuyts 7639acedcc docs: document choo/mount (#391) 2017-02-07 13:59:18 +01:00
Haroen Viaene e8f603782b fix(readme): onunload had parameter on wrong place (#384)
It had the parameter as the body of the function
2017-01-21 16:35:36 +01:00
Mickaël Andrieu edbdc09ade Fixed shema (#378) 2017-01-09 23:34:21 +01:00
Yoshua Wuyts b84189dd25 Fix docs about params (#377) 2017-01-07 02:26:28 +01:00
Paul Sonnentag ff1073a664 Update README.md with correct order of arguments in reducer (#370) 2016-12-19 13:33:04 +01:00
Remi Nyborg 0719c43855 Update README.md with correct 'location:set' usage (#362)
Struggled with a bit when upgrading to v4.0.
2016-12-16 13:56:35 +01:00
Jesse Hattabaugh 08aa47c06f fix(doc): minor edits (#353)
* chaning location:setLocation to location: set

I believe this is how the v4 api is supposed to be used

* adding note about :params

I had a hard time locating this information, and I feel like it's pretty crucial when using a router.
2016-12-11 21:26:26 +01:00
Yoshua Wuyts a7916ec3f9 [major] choo v4 (#352)
* location: change url on location:setLocation

- [ ] don't break hashing
- [ ] allow not changing the url

fixup! move fns around

fixup! add search string

* app.start: clean

* walk: add

* location: update arg calls

* fixup! location: update

* uri-wrap: fix thunking

* router: update to latest sheet-router (#239)

* router: update to latest sheet-router

* tests: fix for latest version

* tests: fix SSR

* tests: fix history

* tests: spruce up

* docs: update example

* examples: update

* deps: bump sheet-router

* 4.0.0-0

* chore(changelog): 4.0.0 (#211)

* feat(api:) arg order (#268)

* s/data, state/state, data/

* feat(api): swap arguments

* fix(href): fix routing (#271)

* feat(http): remove (#269)

* feat(router): enable hash routing (#273)

* deps: fix mount

* 4.0.0-1

* feat(mount): copy {script,link} tags

* 4.0.0-2

* fix(mount): forEach -> for

Lol can't use forEach

* fix(router): use state.location.href (#282)

* fix(mount): use deep node clone

* 4.0.0-3

* fix(deps): remove hash-match

* 4.0.0-4

* fix(mount): return node

* 4.0.0-5

* fix(router): check if a hash is a valid selector (#339)

* 4.0.0-6

* fix(router): pass params on newstate (#343)

* 4.0.0-7

* feat(docs): update for 4.0.0 (#320)

* feat(docs): update for 4.0.0

* docs: update router example in readme (#337)

* chore(changelog): update for v4 (#351)
2016-12-11 19:35:29 +01:00
Dan Motzenbecker 54b6000800 feat(docs): add Thing Translator (#347) 2016-12-11 17:00:01 +01:00
John Lindquist 911eaf397a fix(docs): closing the input tag (#345) 2016-11-29 13:56:04 +01:00
Charlike Mike Reagent cb94fc8d5b feat(docs): add kaktus (#335) 2016-11-26 18:30:08 +01:00
Zeke Sikelianos 12d4ce020e fix(readme): cleanup (#288)
* fix typos in readme

* use leaner markdown links

* alphabetize markdown reference links
2016-10-23 09:16:33 +02:00