mofron
mofron is JavaScript Framework for Web UI.
mofron has interface like .NET,swing. so it makes front-end development possible by only javascript.
Install
mofron dependencies webpack babel expose-loader
npm install mofron
Quick Start
create ./index.html
<html>
<head></head>
<body style="margin:0px;padding:0px;"></body>
<script src='./dist/app.js'></script>
</html>
create ./src/sample.js (button display sample)
require('mofron');
let Button = require('mofron-comp-button');
new Button('test').visible(true);
var btn = new Button('swing');
btn.width(150);
btn.visible(true);
btn.clickEvent(function () {
alert();
});
btn.height(30);
btn.style('background', 'lightblue');
new Button({
param : 'key-val'
width : 150,
height : 30,
clickEvent : function () {
alert('click');
},
visible : true
});
create ./webpack.config.js
module.exports = {
entry: './src/sample.js',
output: {
path: __dirname + '/dist',
filename: 'app.js'
},
module: {
loaders: [{
test: /\.js$/,
exclude: /node_modules/,
loader: 'babel-loader' ,
query: {
presets: ['es2015']
}
}]
}
};
packed
`npm bin`/webpack
more