1.0.5 โข Published 2 years ago
@varuntiwari/tomperjs v1.0.5
๐งพ Description
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
๐ฟ Installation
npm i --save @varuntiwari/tomperjs
๐ Example
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();
}
โจ Features
- 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()
.
โ Tools and Technologies used
๐ Local Installation and setup
- Clone the repo to your local machine.
Install the required dependency for server using :
npm install
๐ Creating production built
Build the package using
npm run build
Update the Docs using
npm run docs