Skip to content

Releases: MithrilJS/mopt

Use babel API correctly

29 Sep 03:21
Compare
Choose a tag to compare

mithril-objectify should no longer expect to be able to find babel-core installed somewhere above it, hooray!

Changes

More optimizations!

02 May 23:31
Compare
Choose a tag to compare

New patterns optimized since 2.0.0

  • Optimize m("div", [].join(...))
  • Optimize m("div", "string".replace(...)) and other String.prototype methods that return a string
  • Optimize m("div", JSON.stringify(...))
  • Optimize conditional expressions (predicate ? consequent : alternate) if the consequent/alternate are valid children types. m("div", fooga ? "wooga" : "booga")
  • Optimize m("div", m.trust("<div></div>"))
  • Optimize m("div", m.component(component)) (New in 2.2.0)

Rollup plugin!

30 Mar 00:25
Compare
Choose a tag to compare

Features

The only new feature in v2.0.0 is the addition of a rollup plugin to simplify usage w/ that bundler.

rollup.rollup({
    entry   : "./entry.js",
    plugins : [
        require("mithril-objectify/rollup")()
    ]
})
.then(function(bundle) {
    return bundle.write({
        dest : "./out/source.js"
    });
})

Breaking Changes

Exports have changed. To access the browserify transform now requires:

require("mithril-objectify/browserify");

The JS API is now available as the default export:

require("mithril-objectify");

All other usage remains the same, and documentation in the README has been updated.

v1.1.1 - Because testing is hard

17 Nov 19:25
Compare
Choose a tag to compare

mithril-objectify now understands the following signature:

m(".foo", [ 1, 2, 3 ].map(function(val) { return m("p", val); }));

Which is another step towards optimizing every little thing that is safe to statically optimize! Right now it's limited to the subset of Array.prototype methods that return an array, so concat, filter, map, reverse, slice, sort, splice will all be optimized. Let me know if I missed one!

npm i mithril-objectify will get you the latest release!

v1.1.1 is a patched version of v1.1.0, which actually included all the above array fun but also included Issue #6, so v.1.1.1 is the clearly superior version!