Open frank-dspeed opened 7 years ago
first of all we have to differ between can-view-autorender and done-autorender.
can-view-autorender, renders a stache template , thats found inside a html document and append that document fragment next to the element.
done-autorender, is set on steal's script tag e.g. <script src="node_modules/steal/steal.js" main="index.stache!done-autorender"></script>
or inside the package.json
e.g. https://github.com/donejs/done-ssr/blob/master/test/tests/package.json#L4 for SSR.
done-autorender replace the whole document
it should be easy to make can-ejs work with can-view-autorender
just add ejs
to https://github.com/canjs/can-view-autorender/blob/master/can-view-autorender.js#L10 regex
for done-autorender
it could be a little bit more complex.
then i can use steal again as universal preprocessor.
Little Theorie Question: do you think it will come maybe a steal-ejs-autorender like the steal stache autorender that you call done-autorender?
i could then examin that and also add jsx and jade/pug autorender then my steal-server could always use steal as preprocessor based on file structure.