Open kristianmandrup opened 9 years ago
Interesting suggestion. Do you talk about the client-side port of the library or for the Node.js module?
the client-side where it is costly to include parts of libraries I don't need to solve a given use case ;) The server side can deal with a few extra kbs it doesn't need...
It makes sense. However, as you said it will take some time to completely separate the functionalities like that. I'll leave this issue open and will try finding time for solving it.
I would recommend to start the separation process internally with one sub-folder for each, then continually testing that it doesn't break... then later break out each sub-folder as a module/package. Cheers :+1:
I'm thinking about fancy Grunt tasks that include only the necessary files. Then provide fallbacks for the missing functions like just methods with same names and location but empty bodies. Or even better if you try calling some of the cut methods the library will thrown an error saying something like You are using absurd-css version that does not support HTML compilation.
+1 Would love absurd.js much more if it just did CSS pre-processing. Other features should be separate projects.
+1 for splitting into dedicated projects like absurd-html etc.
Well, guys I'm thinking about rewriting absurd and indeed maybe creating new modules. Still keep the name "absurd".
:+1:
I feel that absurd currently is a little "too big", trying to solve multiple use cases such as html component, templating and css via javascript. Would be nice to split it up into at least these three modules:
absurd-html absurd-css absurd-components
or something along those lines. I'm aware this would likely require quite a bit of refactoring, but I'm sure it would be worth it for ppl who use it... Now I will look into DaddaJS ;)