coffeekup
coffeekup copied to clipboard
Extension mechanism
Provide a sort of plugin system so that people can develop extensions that can be distributed and consumed easily.
I assume you want discussion here about how the extensions api would work. I've got use cases for extensions that I will evaluate against the ideas discussed.
That's right. Though I think this feature should land in 0.2.5 or 0.3.0 as 0.2.4 needs to get published ASAP.
One feature that could qualify as a plugin to me is abbreviated attributes.
One I'm not sure if should be a plugin or a builtin is stylus support (and markdown, and textile, and sass, and less...).
Some things to bear in mind, off the top of my head:
- CK runs on the browser too. Each additional feature adds to coffeekup.js download size, and potentially (even worse) to each compiled template function.
- Currently coffeekup.coffee is the final coffeekup.js, without modifications, on both node.js and the browser. I think this is desirable to keep.
- CK is not a language. It's a library that allows HTML-resembling CoffeeScript functions to output a string (with the equivalent document) when run. So real language extensions are not possible, only clever exploits of the existing CoffeeScript syntax.