Light and minimal library to organize js of webpages
Obs. This is a old-study project and have a lot of bugs and anti-patterns use at your own risk.
Cloning
git clone https://github.com/MSLacerda/Omnicron
Install dependencies
cd Omnicron
npm install
Dist folder has a version.
import omnicron.min.js into your html project.
<script src="dist/omni.min.js"></script>
<om-cron om-name="burning">
</om-cron>
(() => {
new Omnicron({
app: 'burning',
run: () => {
},
render: {
url: 'tests/files/file.html',
onSuccess: () => {
console.log("rendered!")
}
}
});
})()
Method/Attr | Information | Types |
---|---|---|
run | Will execute if the app exists | Function |
app | Name of the app, need be the same on app Tag | String |
before | Will execute before the run executes | Function |
render | Render a element inside the app | Object |
render.url | Path of the template | String |
render.onSuccess | Will execute when rendering is complete | Function |