Commit graph

1109 commits

Author SHA1 Message Date
Patrik Johnson
b2b0c4abe3 Installation docs: Add link to flems playground and replace shorthand w/ with full word 2022-02-20 17:25:13 +01:00
Claudia Meadows
1eec62eb3e Add changelog entry for m.Fragment, update name in new changelog 2022-02-20 12:23:44 +01:00
Stephan Hoyer
885b3f9442 Consistent naming of Mithril.js 2022-02-19 12:06:39 +01:00
Stephan Hoyer
7b1fda5b66 Add meta description to docs 2022-02-19 12:06:39 +01:00
Per Eriksson
d93cca964e updated babel/webpack docs to work with latest versions 2022-02-18 09:11:51 +01:00
Pierre-Yves Gerardy
891265de8b [docs] route redirection using the history API 2022-02-18 09:11:25 +01:00
Stephan Hoyer
9128d4e60a Correctly handle invalid escapes in routes
based on 0a5ead31c9fbd7b153c521c7f9d3df7bf826ce6c
2022-02-18 07:05:35 +01:00
Stephan Hoyer
e4bd2039b4 Add notice to changelog 2022-02-12 12:19:35 +01:00
Barney Carroll
cea8e64359 Reverting erroneous docs formatting 2022-02-12 12:19:35 +01:00
Barney Carroll
30cc031bf2 Back out migration ToC, correct references to vnode shape 2022-02-12 12:19:35 +01:00
Barney Carroll
febd97aac2 Back out migration ToC, correct references to vnode shape 2022-02-12 12:19:35 +01:00
Barney Carroll
11bced844c Back out migration ToC, correct references to vnode shape 2022-02-12 12:19:35 +01:00
Barney Carroll
9999fbe2a4 Text is always represented as text vnodes, never as vnode.text 2022-02-12 12:19:35 +01:00
hqproto
a671da246d Update standalone usage 2022-02-09 20:38:56 +01:00
mike-ward
8ef7844f5a #2334 Dropdown to select docs for previous versions 2022-02-05 17:50:13 +01:00
James Cote
99c6d813d2
Send URLSearchParams as request body without extra configuration (#2695) 2022-01-31 10:12:02 +01:00
Eugene Epifanov
7faf358e92 Update code on flems.io and update the link to it
This page contains a link to an example running on **flems.io**
The code on **flems.io** depends on `mithrill@1.1.6` and doesn't work with `mithril@2.0.0-rc.4`.
I added `mithril@2.0.0-rc.4` on **flems.io** as a dependancy and fixed some issues caused by `mithrill.withAttr` no longer existing.
Now code on this page and on **flems.io** are identical.
2022-01-26 09:01:32 +01:00
Gabriel Aumala
c075ac7b49 docs: improve m.request return value description
In the m.request return value description, add a line informing that
error status codes cause the promise to reject.
2022-01-25 23:07:51 +01:00
Stephan Hoyer
893de8b4ff Add change notice about m.request adoption for no content handling 2022-01-25 22:30:16 +01:00
Pierre-Yves Gérardy
6aeb03837d Update change log 2022-01-25 21:44:45 +01:00
Per Eriksson
e66aaf1458
A note on JSX events (#2648)
Co-authored-by: Stephan Hoyer <ste.hoyer@gmail.com>
2022-01-25 21:43:03 +01:00
Barney Carroll
70aff8cd69 Better route cancellation example, addresses #1856 2022-01-25 21:30:38 +01:00
Barney Carroll
cd087347f7 Document route resolution cancellation, fixes #1759 2022-01-25 21:30:38 +01:00
Arthur Clemens
5f9c635cad Remove old TOC link
Content was moved some time ago and linked section no longer exists.
2021-08-17 22:34:07 -04:00
cavemansspa
718650dc87
Cavemansspa patch 1 (#2696) 2021-07-30 23:04:52 -07:00
Danylo Hlynskyi
773e570b86
simple-application.md: consistent use of type=submit (#2657)
When following tutorial and typing everything in, I was confused that Save button didn't work. Turned out that tutorial switches type from "button" to "submit", which I haven't spotted. Perhaps it should had been "submit" from start?
2021-02-14 14:59:27 -08:00
Isiah Meadows
045e4f720a
Allow Mithril to be loaded in non-browser environments without modification (#2633) 2020-10-14 03:12:47 -07:00
Oscar
3ad404039f
fix some typos (#2487)
* fix some typos

Found some typos. Mainly unescaped `|` in tables, but also a few other irregularities. Not all problems are visible in the website docs.

* fix `<>` and `|` rendering

Fix those symbols inside a Markdown table, so they render correctly on the website and Github.

Co-authored-by: Isiah Meadows <contact@isiahmeadows.com>
2020-10-06 17:29:09 -07:00
Isiah Meadows
9f0dc2ab46
Runtime-deprecate ospec, change change-log to changelog, fix a few assorted bugs (#2578) 2020-09-29 13:27:07 -07:00
Isiah Meadows
6d1dab07eb Fix assets [skip ci] 2020-09-14 18:55:29 -07:00
Miguel Espinoza
ff3e12e5d3
Update installation.md (#2608) [skip ci]
Co-authored-by: Isiah Meadows <contact@isiahmeadows.com>
2020-07-12 13:26:56 -07:00
Isiah Meadows
31d1df5caa
Fix #2601 (#2603)
Fix issue where ending a stream in the middle of a stream callback would result in erroneous parent stream state for the rest of that emit.
2020-06-16 08:36:40 -07:00
ZeikJT
cf7a841c4c
Remove extra isLifecycleMethod call from removeAttr (#2594) 2020-05-17 00:50:16 -07:00
kczx3
f9c9f6682d
ES6 and m.trust docs patch (#2593) 2020-05-07 15:19:36 -07:00
Denis Sikuler
0680f55893
Replace mocha by ospec in testing page (#2585) 2020-04-20 18:16:03 -07:00
akessner
39c08f967a
change link to go to ospec instead of mocha (#2576)
* change link to go to ospec instead of mocha

Updated link regarding [issue 2575](https://github.com/MithrilJS/mithril.js/issues/2575)

* Update docs/testing.md

Co-authored-by: Isiah Meadows <contact@isiahmeadows.com>
2020-03-15 13:33:49 -07:00
Isiah Meadows
d555498005
updated to the Vimeo showcase (#2573) 2020-03-04 19:37:35 -08:00
Boaz Blake
2ac9bfd363 adding more community examples (#2567)
Co-authored-by: Isiah Meadows <contact@isiahmeadows.com>
2020-01-08 15:39:38 -05:00
Kamil Tomšík
b34b3c3524 Exclude archive of previous docs (#2561)
* remove docs archive (fix #2552)

* Update docs/change-log.md

Co-Authored-By: Isiah Meadows <contact@isiahmeadows.com>

Co-authored-by: Isiah Meadows <contact@isiahmeadows.com>
2020-01-05 11:29:41 -05:00
Pierre-Yves Gérardy
4a3a486d80
Pimp the docs linter (and assorted changes) (#2553)
### Pimp the docs linter (and assorted changes)

 #### `scripts/lint-docs.js`

- Add an optional cache for faster runs
- Add a final report
- Don't return anything from `exec()`
- Cover more files

 #### `scripts/_command.js`

- Look for a "--cache" option

 #### `package.json` scripts

- Added `watch:lint-docs`
- Added `cleanup:lint` to remove the eslint and lint-docs cache files
- Changed `lint:docs` to use the `--cache` option
- Added `test:js` so that we can run the test suite without the linter
- Changed `test` to defer to `test:js`

 #### Actual lint fixes:

- Bad link in a migration guide
- The unicode dashes in the "https://en.wikipedia.org/wiki/Subject–verb–object" are not escaped by marked

### Some more lint-docs pimping

#### `scripts/lint-docs.js`

- some code reorg and cleanup (take a hint from the local coding conventions)
- fix misc bugs
- pass a User-Agent header to the requests
- even nicer reporting

#### `package.json`

- bump the @babel/parser dep to the latest

#### Docs

- tweaks based on lints missed due to previous bugs

### Docs: use the github page for velocity.js, the home page has too many errors.

Co-Authored-By: Isiah Meadows <contact@isiahmeadows.com>
2019-12-19 23:40:52 +01:00
Rasmus Porsager
d257025253 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
2019-10-14 13:06:39 -04:00
Isiah Meadows
512eef378e
Recast key docs to be much clearer and more accurate (#2540)
* Recast key docs to be much clearer and more accurate [skip ci]

Also, fix a couple broken hash links I noticed while making this.

* Ensure `diff` blocks are highlighted correctly
2019-10-11 04:29:11 -04:00
Isiah Meadows
d4551f49f5
Add streams to releases again, include minified bundle, drop in… (#2539)
* Minify stream, add stream stuff to releases again

* Kill off a lot of tech debt, drop internal utilities from npm

1. Kill `module/`, internalize `bundler/`, privatize `test-utils/`

We've been telling people to move elsewhere from these for a while, and
it's about time we just pull the plug here and finally remove them.

- We officially removed the bundler from the public API in v2.0, and
  that was the only one of these that was ever publicly documented.
  Usage should be low enough by now it shouldn't break anyone- I'm not
  seeing bundler bugs being reported anymore, either.
- The `module/` utility was so narrow and caveat-filled that I'm not
  sure anyone really used it (even us core Mithril devs never really
  used it), and we only had it documented in the repo folder it lived
  in. I think only one bug was ever filed, and it's because it somehow
  ended up completely non-functional without any of us realizing it.
- The test utilities were meant to be internal from day 1, but people
  started using it despite us core developers constantly telling people
  to look elsewhere and even the docs recommending specific alternatives
  without mention of our internal mocks. (Now if people would RTFM,
  that'd be nice...)

2. Add dedicated HTML test files to verify ospec and the promise
   polyfill, and ensure the promise tests are in pure ES5.

These are made specially for those and should be much easier to just run
now.

3. Fix the benchmark script to use the real DOM in browsers and to not
   require as many dependencies to create. Also, tweak them to be much
   more effective and precise on what's being tested.

Previously, it was rendering to the HTML file itself, while now it's
rendering to the `body`. This means in browsers, it's triggering layout
and everything, benchmarking how well Mithril optimizes for style and
layout recalcs, too. It also puts some pressure on the hyperscript
parser attribute application, so that can be noticed as well.

* Update dependencies
2019-10-03 04:58:14 -04:00
Isiah Meadows
34f4363357
Add m.censor, adjust m.route.Link to use it (#2538)
Also, restructure a few things for better code reuse.
2019-09-30 18:44:39 -04:00
Isiah Meadows
3fa1630f91
Add params: to m.route.Link, fix docs (#2537) 2019-09-30 17:16:24 -04:00
Isiah Meadows
b98ab29efd
Make errors and their messages more accurate and helpful (#2536)
Also, I normalized them to all be sentences for consistency, and I moved
the reentrancy check from `m.mount` to `m.render` to be a little more
helpful. The router change during mounting is inconsequential and only
to avoid the new modified error, and the change to the update loop is to
send the original error if an error occurred while initializing the
default route. (This is all around more useful anyways.)

And while I was at it, I fixed an obscure bug with sync redraws.
2019-09-30 16:08:04 -04:00
Isiah Meadows
475747800a Update CoC 2019-09-28 13:38:36 -04:00
Isiah Meadows
da211d74ba Update per v1.1.7 release 2019-09-23 19:11:32 -04:00
soulofmischief
0ea6a190b6 Fix assertion descriptions (#2405)
* Fix assertion descriptions

Move return statement to the end of define()

* ospec: Fix assertion definitions

* Fix typo in assertion

* Add test for descriptions being returned on fail

* Reference result instead of self in returned description method

* Fix style errors
2019-09-22 03:35:07 -04:00
Gustavo Rodrigues
ddb3d4ab07 Update fetch() browser support in docs (#2522)
* Update fetch() browser support in docs

As https://caniuse.com/#feat=fetch shows it's supported since Safari 10.1.

* Update docs/request.md

Co-Authored-By: Isiah Meadows <contact@isiahmeadows.com>

[skip ci]
2019-08-30 08:55:32 -04:00