At work we're creating our own javascript library for WEB programming (basically HTML, JS and CSS) to use in real projects for customers, we want to use it like this:
Utils.validate()
Utils.validate('all', function(validation){
[...]
}
In the library code, we define a const Utils:
const Utils {
validate: function($el = null, callback = null){
[...]
}
}
I want to know what would be the best strategies to use this library in future projects, and how would the const Utils be accessible from the external code. There are options like CDN, or even including all the library code in each new project, maybe minified.. Anyway, I'd like to read some approaches about this question, it's my first post here in Stack Overflow..
Aucun commentaire:
Enregistrer un commentaire