MithrilJS / mithril.js

A JavaScript Framework for Building Brilliant Applications
https://mithril.js.org
MIT License
14.02k stars 925 forks source link

Compiling Templates - errors #306

Closed efekty closed 10 years ago

efekty commented 10 years ago
  1. Documentation errors: a) there is: sjs --module /mithril.compile.sjs --output .js .js it should to be: template-compiler.sjs b) Why is this file on another repository only?
  2. Documentation enhancement, suggestion: I think there should to be more about manual compiling - I like it. It's realy nice to write {tag: 'body',attrs: {}, children: []} and to saw how the performance is growing.
  3. Compiling errors:

INPUT.js: var todo = {}; todo.view = function() {return m("html", m("body", [m("input"), m("button", "Add")]));};

OUTPUT.js: var todo$705 = {}; todo$705.view = function () { return Mithril('html', { tag: 'body', attrs: {}, children: partial$631 }); };wiesiek@nb:~/m$

ERRORS: a) Mithril b) partial$631 c) it is not in this example, but it change only part of names like todo

lhorie commented 10 years ago

The $partial issue was reported in #286 and is already fixed in origin/next. I fixed the reference to the file in the docs as well.