mimosa icon indicating copy to clipboard operation
mimosa copied to clipboard

streamline.js support

Open neverfox opened this issue 11 years ago • 3 comments

We Mimosa junkies love new features and this one seems like it would be a great fit. Basically Mimosa would need to recognize ._js and ._coffee files so as to compile them with streamline's _node or _coffee.

neverfox avatar May 25 '13 08:05 neverfox

Ill take a look, thanks!

Sent from my iPhone


On 2013-05-25 12:10:38 +0000 neverfox [email protected] wrote:

We Mimosa junkies love new features and this one seems like it would be a great fit. Basically Mimosa would need to recognize ._js and ._coffee files so as to compile them with streamline's _node or _coffee.


Reply to this email directly or view it on GitHub: https://github.com/dbashford/mimosa/issues/194

dbashford avatar May 25 '13 12:05 dbashford

streamline doesn't seem to expose a simple function to compile some text or a file. I'd likely have to spawn a child process to get this done and that isn't ideal.

But maybe I'm missing something. @bjouhier, is there a way for me to pass some text and a config to streamline and have it compile the file? Something like this: https://github.com/dbashford/mimosa/blob/master/src/modules/compilers/javascript/iced-compiler.coffee#L20

dbashford avatar Jun 10 '13 21:06 dbashford

@dbashford yes, there is a public transform API. It's just a bit hidden in the readme: https://github.com/Sage/streamlinejs/blob/master/lib/callbacks/transform.md

bjouhier avatar Jun 10 '13 22:06 bjouhier