Closed Guria closed 8 years ago
Can you define potential users of such runtime?
From veged/xjst
For example, XJST can be used as:
- HTTP request router
- template engine
- AST transformator
- parser
Also
svg
enginexjst
also suitable as actions/classes factoriespostcss
/posthtml
users could like modular xjst
as well :)Also I am bit crazy on splitting of responsibilities. I think it helps codebase to be more readable and maintanable.
👍
That's all good but what you expect from bem-xjst
? What the API you propose?
xjst: apply*
, match
, def
, once
, wrap
, mode
, replace
, oninit
bemxjst: block
, elem
, mod
, elemMod
, mix
, content
+ above
bemtree: above
bemhtml: tag
, cls
, attrs
, js
+ above
No, I mean we talking about JS now, what the API you await? Some example in JS would be awesome.
I know as a user of old known xjst that there are a bunch of disadvantages related to it's complexity. It's really hard to use on custom transformations in comparison to XXXtraverse + vanilla.js. And even if xjst useful for creating languages, anyway there are not so much cases for that at my POV.
Atm you just propose to split xjst logic from bem-xjst (correct me if I'm wrong) but bem-xjst by self will become slower and it is not acceptable.
But I'm not against it (since there are much pros still) if you can do it without losing performance.
bemtree: above
Nope. I have related question: https://github.com/bem/bem-xjst/issues/332#issuecomment-249005637
I need this, I want this, I like this! ;)
Hi there! I have made PoC of this issue. Let's discuss here #371 ;)
After meeting we decided to split this issue to:
require()
I wonder if it's possible to extract basic runtime without bem-specific modes. xjst initially was for general purpose data transfomations. Would be great to have modern runtime implementation for other then bem-related usages.