Currently the :preamble and :target :nodejs compiler options are mutually 
exclusive.

I recently had a situation where I wanted to use a preamble with node: I came 
across
a nodejs module for [source map 
support](http://github.com/evanw/node-source-map-support).

It requires adding a bit of code at the top of the compiled file to 

    //# sourceMappingURL=path/to/source.map
    require('source-map-support').install();

While the source map support is still rudimentary, I don't see a reason not to 
allow
nodejs targets to have a preamble.

I've attached a patch that adds the preamble directly after the node hashbang.

If this looks like something that would be generally useful, I'm happy to 
create a JIRA issue and attach the patch.

Cheers,

Michael Glaesemann
grzm seespotcode net


-- 
Note that posts from new members are moderated - please be patient with your 
first post.
--- 
You received this message because you are subscribed to the Google Groups 
"ClojureScript" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/clojurescript.

Attachment: nodejs-preamble.patch
Description: Binary data

Reply via email to