mofron
mofron is JavaScript Framework for Web UI.
mofron has interface like Swing, .NET so it makes front-end development possible by only javascript.
Quick Start
mofron require webpack babel expose-loader
npm init
npm install --save-dev webpack expose-loader babel-core babel-loader babel-preset-es2015 mofron
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');
require('mofron-comp-button');
new mofron.comp.Button('test').visible(true);
var btn = new mofron.comp.Button('size');
btn.width(150);
btn.visible(true);
btn.height(30);
btn.style('background', 'white');
new mofron.comp.Button('simple code', {
width : 150,
height : 30,
visible : true
});
var click = new mofron.comp.Button('click');
click.setClickEvent(function() {
alert('click');
});
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