Commit graph

35 commits

Author SHA1 Message Date
Pierre-Yves
e0996bd6f2 Fix docs linting issues 2023-01-24 16:12:47 +01:00
Pierre-Yves Gérardy
e28385b14f
Move the chat to Zulip (#2771) 2022-05-24 23:15:14 +02:00
tebe
53bedd1102
Add Simple Application Flems Supporting v2.0.4 and up (#2751) 2022-03-01 11:26:12 +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
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
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
234b1c9302 Update migration, fix various minor issues
- Lot of people couldn't migrate to v1 and plan to reevaluate when v2 is
  released.
- It's "npm" not "NPM". It doesn't stand for anything, and it never
  has - it was initially chosen simply because it was easy to type.
  It has a lot of unofficial backronyms with "Node Package Manager"
  being one of the most common ones, but it's never officially stood
  for anything as an acronym *or* initialism.
- Fixed a few errors in the change log, like non-breaking changes being
  included in the "Breaking Changes" section and an inaccuracy in the
  summary of a particular change.
- Fixed RawGit URLs to point to GitHack, which is a lighter proxy that
  offloads caching to Cloudflare instead of also implementing it itself.
  (It also just uses nginx for all the important server logic, so it
  scales better.)
- Add a few more v0.2 references as appropriate
2019-07-24 05:01:20 -04:00
Isiah Meadows
b580e241c8 Prepare for v2, s/markup/html/g in code blocks 2019-07-23 16:42:54 -04:00
Isiah Meadows
20f0759103
Fix docs (#2482)
* Fix #2414, address part of #1687

Also cleared the CSS up to be a lot more readable instead of smooshed
into a single line.

* Redo the testing docs page

- Addresses another part of #1687
- Also, fix a few linter issues in the ospec binary

* Add note about third-party cookies, tweak a line

* Make the JSX comparison much more meaningful

And let the code speak for itself. Don't fuel the flame wars any more
than what they've already become. We should be *unopinionated*, and so
I've updated those docs to remove the existing opinion.

* Remove a bunch of outdated ES6 references

* Remove the CSS page
2019-07-23 16:33:56 -04:00
Isiah Meadows
582bda56dc
Partially recast the router API to be a lot more intuitive. (#2469)
* Recast the router API to be a lot more intuitive.

Fixes #2387
Fixes #2072
Fixes quite a few issues reported on Gitter.

For `m.route.Link`:

- More intuitive
- More accessible
- More ergonomic
- It can be disabled
- It can be cancelled
- It can be changed
- Oh, and you can use it isomorphically.

For `m.route.prefix`

- You can *read* it.
- You can write to it, of course.
- It's literally just setting a property.

For the router itself (and the rest of Mithril):

- You can now `require("mithril")` and all its submodules without a DOM
  at all. There is a catch: you can't instantiate any routes, you can't
  mount anything, and you can't invoke `m.render` in any capacity. You
  can only use `m.route.Link`, `m.route.prefix`, hyperscript stuff, and
  `mithril/stream`, and you can use `m.request` with `background: true`
  if you use a global XHR polyfill. (You can't use `m.request` without
  `background: true` except with a DOM to redraw with.) The goal here is
  to try to get out of the way for simple testing and to defer the
  inevitable `TypeError`s for the relevant DOM methods to runtime.

  The factory requires no arguments, and in terms of globals, you can
  just figure out based on what errors are thrown what globals to
  define. Their values don't matter - they just need to be set to
  *something*, even if it's just `null` or `undefined`, before Mithril
  executes.

Had to make quite a few other changes throughout the docs and tests to
update them accordingly. Oh, and that massive router overhaul enabled me
to do all this.

Also, slip in a few drive-by fixes to the mocks so they're a little
easier to work with and can accept more URLs. This was required for a
few of the tests.

* Update changelog + numbers, add forgotten bundle option

* Add PR numbers to changelog [skip ci]

* Allow continuing to the next match by returning `false`.

* Update numbers again
2019-07-12 15:29:37 -04:00
Isiah Meadows
a23bcea7ee
Correct a bunch of incorrect/outdated references (#2457)
- Babel 7 has a whole different module API
- Traceur is basically dead
- JSX != HTML
- Some bits are just obvious from context what they are
- ES6 docs shouldn't be auto-installing JSX support
- Also, I decided it was worth clearing up some misleading docs in
  surrounding areas.
2019-07-06 03:41:01 -04:00
Erik Vullings
8a7eae00ed Fix for #2423. request.data => body, params is used for querystrings (#2425)
* Fix for #2423. request.data is replaced by body, params is used for querystring interpolation.

* Updated documentation after code review by shadowhand and isiahmeadows

* Convert indentation to tabs

* Replacing m.request.data and m.jsonp.data with params or body.

* Update request.md


Co-authored-by: Isiah Meadows <contact@isiahmeadows.com>
2019-06-10 19:36:32 -04:00
Ayush Jain
982fdf5737 Corrected the case issue of 'JavaScript' throughout the docs (#2401)
* corrected JavaScript spelling
2019-04-01 08:14:38 -04:00
Isiah Meadows
26b8d994ce
Remove m.prop + m.withAttr (#2317)
* Remove `m.prop` + `m.withAttr`

- For many uses, `m.withAttr` is *more* verbose than just directly using
  an event handler
- If you're using it with a bound callback, you're literally wasting a
  single character in the human readable version (and you're *saving*
  them in the minified output).
- It sometimes obscures your intent, if overused.
- Functions are easier to compress than `m.withAttr`, resulting in
  slightly smaller bundles.
- `m.withAttr` is overused anyways.
- `m.prop` is basically useless without `m.withAttr`, and the API
  doesn't have the same benefits it had with 0.2.x.

* Update changelog
2018-11-30 20:41:24 -05:00
Henry
4e35d0591c quick grammar fix (#2163) 2018-05-24 16:23:20 -10:00
cavemansspa
5f9872b811 docs: Add flems version of sample application (#2049) 2017-12-05 15:04:29 -08:00
Matilda Smeds
12d9085fe7 docs: Consistent filepath comments to tutorial (#1965) 2017-09-11 23:09:44 -07:00
Pierre-Yves Gérardy
6a6b38aee7 Merge pull request #1790 from spacejack/tutorial-remove-interpolation
Remove url interpolation from tutorial app
2017-06-14 00:00:55 +02:00
Pat Cavit
bef58fdfa5 chore: Update repo references (#1834) 2017-05-02 09:24:12 -07:00
spacejack
5e654452e1 Remove url interpolation from tutorial app 2017-04-09 15:19:24 -04:00
Stefan Thon
c904758f10 button[type=button] => button[type=submit]
I went through the tutorial.
button[type=button] was not working for me.
button[type=submit] did.
2017-03-29 11:14:43 +02:00
Leo
818c13dba9 fix example 2017-02-19 08:27:31 -05:00
spacejack
19f1ac8908 Minor fixes to get the tutorial working 2017-02-12 19:41:47 -05:00
maks feltrin
0ec2bd9ac3 fix doc typo 2017-02-02 00:37:48 +01:00
Alexander Travov
9122d00d03 Fix model import. 2017-01-16 16:22:56 +03:00
Alexander Travov
15cfaa9655 Get rid of unnecessary nested array. 2017-01-16 16:20:45 +03:00
Alexander Travov
70f8655f52 Make file paths consistent across tutorial and installation instruction. 2017-01-16 15:57:17 +03:00
Alexander Travov
839f9a7583 Fix typo. 2017-01-16 15:56:04 +03:00
Leo
bcaeadf23c fix errors in guide 2017-01-14 17:34:39 -05:00
Patrik Johnson
d63a88618e Rewrite docs clarity (#1534)
* Add a few words and bits for clarity and better text flow in the rewrite docs
* Rephrase some helpful wording
2017-01-11 15:57:14 -08:00
Leo Horie
84cb1ecb3d add conclusion to tut 2017-01-08 22:36:42 -05:00
Leo Horie
5c75aa9fa1 more tweaks 2017-01-08 19:14:57 -05:00
Leo
d40b324645 doc fixes 2017-01-08 14:47:38 -05:00
Leo Horie
82ebff4336 tut 2017-01-08 13:35:56 -05:00