📜 ⬆️ ⬇️

Another includeJS

Just do not laugh. Perhaps this is the best introductory phrase - because well, actually, “How? Another script builder? Yes, in the post will talk about another "personal training". I will try not just to throw in another Libe, but to reflect on what this solution could have been better than a million others. Maybe I will not be able to convey to you everything as it is, but I will try, but you do not judge strictly. This will be the second article in the series on components and MVP. If interested you can get acquainted with the first .

Problem component


Often, components / widgets in addition to scripts consist of other resources - html markup, styles, images, components. And here, it would be desirable to receive the collector of these resources. During development, specify the path to the directory with components / libraries, connect the necessary, and during the assembly html will be glued into one, styles and javascript too, the pictures will be copied into our application - “To eat is served”. I ask you not to kick it painfully, such “designers” already exist, but I couldn’t find the right one - and besides, my goal was not to create a competing product, but to do the thing I needed for myself.

Here (github) you can download / look at this item. The one to whom this topic seemed interesting, and who is willing to devote 10 minutes to this inept writing, I invite you to the cat.
')


A bit of history, or what is the right bike


To be honest, I find it a little embarrassing to call things “right” or write “how to do something,” because this is all subjective, therefore, treat this as such.
When we face a challenge, we evaluate what tools we have to solve it, and what tools we don’t have. We also think that it could speed up the process. And if we decided a little bit, just a little bit, to correct the existing tools - that's all, the first step in a hundred miles to the bike was made. Many more similar tasks should be solved, where we will build a functional brick by brick. Not everyone will survive the tasks, somewhere we spit and take ready libraries. And somewhere, the need for these “just a little bit to finish” will simply disappear, and then, like water that has nowhere to flow, will turn into a marsh. But the swamp is not bad, but on the contrary - it gives life to millions of species.
But if the toolkit survived, it is a plural “little bit of finishing”, then as a result, we will get a “Thing”, where we will know every comma or vice versa, the future I will be surprised and laugh at I am real. Where we can easily add, change, rule the functionality. Where the wind of freedom is felt, when this “Thing” does what you want, and the way you want it. I apologize for this lyrical digression.

And the story itself is banal


Source: https://habr.com/ru/post/150370/


All Articles