rzorzal / ant-orm Goto Github PK
View Code? Open in Web Editor NEWA simples, structured and secure indexedDB ORM
License: MIT License
A simples, structured and secure indexedDB ORM
License: MIT License
When using ant with systems like VueJS in a component structure, it's hard to use fixed paths to models and workers. The workers have to be copied, then imported, and models are always loaded by file path.
ANT plays nice with module a node module system, however still relies on these paths. This causes issues when used with a compiler like Webpack or such. The way these are imported, it's also simply not possible to use something like worker-loader to compile an application into a production ready, minimised file, hence there's always a need to add the 4 separate files into the project as uncompiled code. This also makes updating the package harder in the future as the files need to be copied on every build to ensure it's the latest version.
Suggestion: Use Freelancer, Blobs or this SO post to create service workers without needing a file path.
Suggestion: Allow models to be imported by Object reference:
import UserModel from 'Models/User'
ANT.init({
models: { // Instead of modelsPaths to keep it compatible
User: UserModel
}
})
I currently haven't had the time to dig through all the code, but I'd love to try and improve on it. I'll make a PR if I've made some progress. Are you able to provide a test script of sorts I can use as a verification that everything still works as required?
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.