3.1.2 • Published 7 years ago

mithril-objectify v3.1.2

Weekly downloads
2
License
MIT
Repository
github
Last release
7 years ago

mithril-objectify NPM Version NPM License

A babel plugin to transform mithril hyperscript function invocations like m(".fooga") into static JS objects like:

{ tag: "div", attrs: { "className" : "fooga" }, children: [ ] }

for speeeeeed.

Please file an issue if you come across any cases that this doesn't handle, I'd love to improve the number of structures I can rewrite!

:warning: :zap: :warning: Maintenance Mode :warning: :zap: :warning:

This version is for mithril@0.2.x only and is unlikely to receive future updates.

To optimize mithril@1.x code use mopt.

Installation

Install with npm

npm i mithril-objectify

Usage

.babelrc

// .babelrc
{
    "plugins": [ "mithril-objectify" ]
}

CLI

$ babel --plugins mithril-objectify script.js

API

require("babel-core").transform("<code>", {
  plugins: [ "mithril-objectify" ]
});

Rollup

rollup-plugin-babel

Browserify

babelify

WebPack

babel-loader

3.1.2

7 years ago

3.1.1

7 years ago

3.1.0

8 years ago

3.0.2

8 years ago

3.0.3

8 years ago

3.0.1

8 years ago

3.0.0

8 years ago

2.2.5

8 years ago

2.2.4

8 years ago

2.2.3

8 years ago

2.2.2

8 years ago

2.2.1

8 years ago

2.2.0

8 years ago

2.1.1

8 years ago

2.0.1

8 years ago

2.0.0

8 years ago

1.2.4

8 years ago

1.2.3

8 years ago

1.2.2

8 years ago

1.2.1

8 years ago

1.2.0

8 years ago

1.1.1

8 years ago

1.1.0

8 years ago

1.0.1

9 years ago

1.0.0

9 years ago