A classic Web-Framework
TomperJS is a web-framework based on MVC(Model-View-Controller) architecture pattern. It is very similar to one of the most popular web-framework BackboneJS
npm i --save @varuntiwari/tomperjs
import { View } from '@varuntiwari/tomperjs';
class MyView extends View {
template() {
return `
<div>
<h1>Awesome App</h1>
</div>
`;
}
}
const root = document.getElementById('root');
if (root) {
// Create view
const myView = new MyView(root);
// Render the view
myView.render();
}
- Uses Model-View-Controller pattern.
- Collection support for handling multiple models of similar type.
- Reactive views which reacts to change on a Model.
- User and custom events support using
Eventing
module. - Built-in standard API controllers like
fetch()
andsave()
.
-
Clone the repo to your local machine.
-
Install the required dependency for server using :
npm install
-
Build the package using
npm run build
-
Update the Docs using
npm run docs
Varun Kumar Tiwari LinkedIn Github |
(If you liked the project, give it star 😃)