Flems in docs (#2348) [skip ci]

* Initial addition of flems - fixes #526

* Fix leftover ```js code blocks

* Add DOCTYPE

* Fix edge & IE11

* Don't show console

* Change orientation on mobile

* Use mithril@next for playground link

* Improve loading and structure

* Fix header alignment in IE

* Don't rotate logo

* Fix conflicts

* Allow `js` tags

* Fix code block query

* Fix Routing section and flems

* Fix firefox

* Improve flems styling

* Improve copy

* Fix data -> body in m.request sample

* Add flems in docs usage description
This commit is contained in:
Rasmus Porsager 2019-10-14 19:06:39 +02:00 committed by Isiah Meadows
parent 512eef378e
commit d257025253
6 changed files with 160 additions and 28 deletions

View file

@ -6,6 +6,7 @@
- [I'm submitting a PR. How do I run tests?](#i'm-submitting-a-pr-how-do-i-run-tests?)
- [How do I build Mithril?](#how-do-i-build-mithril?)
- [Is there a style guide?](#is-there-a-style-guide?)
- [How do I embed live previews in docs?](#how-do-I-embed-live-previews-in-docs?)
- [Why do tests mock the browser APIs?](#why-do-tests-mock-the-browser-apis?)
- [Why does Mithril use its own testing framework and not Mocha/Jasmine/Tape?](#why-does-mithril-use-its-own-testing-framework-and-not-mochajasminetape?)
- [Why doesn't the Mithril codebase use ES6 via Babel or Bublé? Would a PR to upgrade be welcome?](#why-doesn't-the-mithril-codebase-use-es6-via-babel-or-bublé?-would-a-pr-to-upgrade-be-welcome?)
@ -69,6 +70,12 @@ Spacing and formatting inconsistencies may be fixed after the fact, and we don't
## How do I embed live previews in docs?
Any code tag marked as `js` and not `javascript` will automatically be wrapped in a live Flems preview.
## Why do tests mock the browser APIs?
Most notoriously, because it's impossible to test the router and some side effects properly otherwise. Also, mocks allow the tests to run under Node.js without requiring heavy dependencies like PhantomJS/ChromeDriver/JSDOM.