Commit graph

454 commits

Author SHA1 Message Date
Deon Tan
6ffeeaa19d Update mithril.md
Should component be MyComponent?
2016-06-17 16:13:02 +01:00
Leo Horie
9f91858843 Merge remote-tracking branch 'origin/next' into next 2016-06-06 09:22:20 -04:00
Syaiful Bahri
52b0918297 update integration docs
correct the code example to avoid infinite loop

the infinite loop occure because the code example also
update the value on change handler. issue #954.
prove https://jsfiddle.net/syaiful6/kps3gabo/
2016-06-05 12:02:55 +07:00
Leo Horie
2289061f90 fix doc 2016-06-03 16:53:24 -04:00
Demian Ferreiro
20dfbbadc6 Update mithril.request.md
Add call to promise returned by m.request(). Otherwise the value of `ctrl.user` will always be truthy.
2016-05-27 11:08:47 -03:00
Leo Horie
0ad6749f87 callbackName 2016-05-26 11:19:39 -04:00
AlonsoSoto
51e553f980 Update mithril.request.md 2016-05-20 14:36:20 -05:00
Alexandr Panchenko
4e8ca4035c ContactList → ContactForm 2016-05-17 17:50:47 +03:00
Demian Ferreiro
577808c6df Add <body> tag to Getting Started guide
This makes the code on the Summary section a working single-file application.

Without the <body> tag the code failed with "Error: Please ensure the DOM element exists before rendering a template into it" because the <script> containing the application was inserted and run on the <head>, before `document.body` is created.
2016-04-21 12:36:45 -03:00
Leo Horie
07424db3ce Merge pull request #1023 from tivac/mount-body
[docs] mount to document.body instead
2016-04-21 09:58:12 -04:00
Pat Cavit
9ec3383c29 Mount to document.body
As brought up in #1019, mounting to the `document` can be problematic. Better to show mounting to `document.body` where things are a bit more straightforward.
2016-04-20 23:48:51 -07:00
Leo Horie
5d2b6ea2b7 v0.2.4 2016-04-20 00:45:42 -04:00
Ryan Whitmire
ad0fc7ed60 fix broken link in mithril.deps.md 2016-03-17 22:42:21 -04:00
Leo Horie
4b97b94f38 fix change log styling 2016-03-02 16:22:00 -05:00
Leo Horie
501e380825 v0.2.3 2016-03-02 16:10:51 -05:00
Leo Horie
5f804460fe Merge pull request #958 from barneycarroll/patch-1
"Currently active component" is unhelpful at best, misleading at worst
2016-02-10 12:07:01 -05:00
Leo Horie
42d756ea74 change link to Arthur Clemens' template compiler 2016-02-08 10:28:51 -05:00
Barney Carroll
6e60ed5720 "Currently active component" is ambiguous at best
It seems this condition is put here to reassure users that redrawing in a given route state will not draw the views of components for other routes, but it's difficult to imagine how somebody might worry that might happen.

As it is, people end up believing that redraw acts per-component, which is highly misleading in a situation where there are nested components or multiple mount points, and the call to redraw is invoked within one of those components.
2016-02-07 19:20:31 +00:00
Leo Horie
56a51664b7 Merge branch 'next' of github.com:lhorie/mithril.js into next 2016-02-05 12:19:41 -05:00
Leo Horie
741e588f4d don't render undefined classes 2016-02-05 12:19:28 -05:00
Scott Kelly
55b29d2bef Fixes typo in component.md 2016-02-03 21:54:49 -06:00
Chad Whitacre
ef5ed9d70c fix typo: contoller → controller 2016-01-26 17:44:07 -05:00
Luis Felipe Souza
e083aaac9e Issue #938 Fixing typo 2016-01-22 14:21:41 -02:00
impinball
b218f5156f Reapply docs fix 2016-01-22 08:20:26 -05:00
Isiah Meadows
a8eb0fb082 Revert "Fix docs error" 2016-01-22 08:18:19 -05:00
Isiah Meadows
f2540f3d04 Merge pull request #940 from isiahmeadows/next
Fix docs error
2016-01-22 08:17:40 -05:00
impinball
90aa355795 Merge branch 'master' of https://github.com/lhorie/mithril.js into next 2016-01-22 08:13:53 -05:00
Roger Nesbitt
843a720f52 Small documentation tweak
Use "kB" instead of "kb" and include a space between units and the unit symbol.
After discussion with @isiahmeadows, make the size more specific too.
2015-12-31 23:00:37 +13:00
Leo Horie
270b20a2b0 v0.2.2-rc.1 2015-12-20 09:14:28 -05:00
Leo Horie
484a9d6c70 Merge remote-tracking branch 'origin/next' into next
Conflicts:
	mithril.min.js
	mithril.min.js.map
2015-12-18 22:09:11 -05:00
Leo Horie
884b2c5f81 update change log 2015-12-18 22:06:48 -05:00
Sean Hussey
c1912d2726 Fixing a few typos. Changing all instances of "thennable" to
"thenable". No functional changes.
2015-12-18 14:40:41 -05:00
Einar Norðfjörð
5ef5addb82 fix linting errors 2015-12-10 19:01:52 +00:00
kaspertidemann
a3af03a600 Fixes wording. 2015-12-10 15:51:17 +01:00
Leo Horie
b121ba2824 point to mithril-objectify 2015-12-02 22:06:05 -05:00
Leo Horie
b12453b156 Merge pull request #849 from bewildergeist/download-links-to-installation
Point Download button and topnav link to installation.html
2015-12-01 18:38:09 -05:00
Julien Bisconti
c92c92d9df fix missing paren in code 2015-11-30 21:06:58 +01:00
Dan Okkels Brendstrup
e9d46d0e06 Download button + links point to Installation page 2015-11-15 20:59:53 +01:00
Christian Natis
a3410b8f3e Fixed syntax error in example 2015-11-12 10:56:46 -05:00
ly
414e80a1c9 FIX: document error on master branch according to #839 2015-11-12 17:59:15 +08:00
impinball
12b8f044f1 Convert tests to Mocha/Chai/Sinon and lint them.
Details:

1. All tests now live in `test`. All test dependencies that aren't from npm live
   in `test-deps`.

2. The QUnit tests are gone, as well as their dependencies. Half of them
   duplicated existing tests, and some of them depended on the real DOM to
   properly test.

3. All tests are now using Mocha to run the tests, Chai for assertions, and
   Sinon and Sinon Chai for testing some callbacks.

4. Tests are run through mocha-phantomjs. If you want to run just the tests,
   run `grunt mocha_phantomjs` or fire up a server in the root and open
   `http://localhost:<port>/test/index.html`, e.g. `python3 -m http.server`.

5. The linter I chose is ESLint. It is relatively easy to configure, but with a
   lot of flexibility. The rules I chose mostly were in tune to the style the
   project was already using. I'm not including a style guide in this commit,
   but one will likely come. You can check out the `.eslintrc` in the root and
   in `test/` for the two configs. The `.eslintignore` includes a TODO for
   `mithril.js` itself targeted at me, in the root.

Other info:

- As a drive-by fix, I fixed line endings on a few of the files.

- I also took care of a few other files and linted them as I went:

  - `Gruntfile.js`
  - `test/input-cursor.html` (was in `tests/`)
  - `test/svg.html` (was in `tests/`)
  - `docs/layout/tools/template-converter.html`
  - `docs/layout/tools/template-converter.js`

  I didn't test the template converter after linting it, because it needs
  further scrutiny to ensure it works with the latest version of Mithril. I
  know the API has changed a little, which is why I want to be sure.

- I simplified the `.travis.yml` file because none of the tests are run directly
  through Node anymore. They are always run in a browser of some kind.

Hopefully, this turned out all right...
2015-10-31 11:07:22 -04:00
Leo Horie
80f43c260b fix file size in docs 2015-09-28 22:26:41 -04:00
Leo Horie
8fa84c33f8 Merge pull request #783 from mt-caret/next
Fix sample code in m.request documentation
2015-08-28 09:49:55 -04:00
Leo Horie
626144f34c Merge pull request #775 from deomitrus/patch-1
Grammar/spelling fix
2015-08-28 09:20:28 -04:00
Masayuki Takeda
f9953b8f74 m.request: fix sample code in documentation 2015-08-28 22:18:46 +09:00
Deomitrus
322ec7e120 Grammar/spelling fix 2015-08-24 21:08:40 -04:00
Mihail Diordiev
a746d67267 Fix typo in the example of data binding 2015-08-22 19:43:05 +03:00
Mihail Diordiev
57c9cfa76b Fix SyntaxError in the render example 2015-08-20 01:47:27 +03:00
Ivan Borisenko
8a8829c2e1 Module -> mount rename: fix a documentation link 2015-08-18 21:42:08 +03:00
Leo Horie
ed3f3f0686 document component shorthand syntax 2015-07-23 23:43:19 -04:00