mithril-migrate

WebJar for mithril-migrate

License

License

MIT
GroupId

GroupId

org.webjars.npm
ArtifactId

ArtifactId

mithril-migrate
Last Version

Last Version

1.0.0
Release Date

Release Date

Type

Type

jar
Description

Description

mithril-migrate
WebJar for mithril-migrate
Project URL

Project URL

http://webjars.org
Source Code Management

Source Code Management

https://github.com/activitystream/mithril-migrate

Download mithril-migrate

How to add to project

<!-- https://jarcasting.com/artifacts/org.webjars.npm/mithril-migrate/ -->
<dependency>
    <groupId>org.webjars.npm</groupId>
    <artifactId>mithril-migrate</artifactId>
    <version>1.0.0</version>
</dependency>
// https://jarcasting.com/artifacts/org.webjars.npm/mithril-migrate/
implementation 'org.webjars.npm:mithril-migrate:1.0.0'
// https://jarcasting.com/artifacts/org.webjars.npm/mithril-migrate/
implementation ("org.webjars.npm:mithril-migrate:1.0.0")
'org.webjars.npm:mithril-migrate:jar:1.0.0'
<dependency org="org.webjars.npm" name="mithril-migrate" rev="1.0.0">
  <artifact name="mithril-migrate" type="jar" />
</dependency>
@Grapes(
@Grab(group='org.webjars.npm', module='mithril-migrate', version='1.0.0')
)
libraryDependencies += "org.webjars.npm" % "mithril-migrate" % "1.0.0"
[org.webjars.npm/mithril-migrate "1.0.0"]

Dependencies

There are no dependencies for this project. It is a standalone project that does not depend on any other jars.

Project Modules

There are no modules declared in this project.

Usage

    // app.js
    var m = require('mithril');
    var mithril1 = require('mithril1'); // or however you want
    var migrate = require('mithril-migrate');

    migrate.m = m;
    migrate.m1 = mithril1;

    var myComponent = require('./mycomponent.js');
    
    m.mount(document.body, {
        view: function(){
            return m('.container', [
                m(myComponent)
            ])
        }
    })
// mycomponent.js

var m = require('mithril1'); // or however you load mithril v1 into your app
var migrate = require('mithril-migrate');

var myComponent = {
    oninit: function(){
        console.log('intializing mithril 1.0 component inside 0.2');
    },
    view: function(vnode) {
        return m('h1', 'success')
    }
}

module.exports = migrate(myComponent);
org.webjars.npm

Activity Stream

Versions

Version
1.0.0