I don't see why you'd jump through so many hoops just to avoid an upfont compilation step. `require.extensions` may be deprecated in the future and is generally frowned upon.
On Wed, Aug 8, 2012 at 2:36 PM, Krzysztof Baranowski <[email protected]>wrote: > Found something sort of close to an aswer: Up lets you specify an > "options.requires" array that gets passed to the child process so you can > tell it to require any modules you want before running. Trouble is, they > get required AFTER it tries to load your program (with require), which > means coffeescript support won't be available to load your program from a > .coffee file directly. > > My temporary solution is to just not use Up, may revisit this question in > the future. Thanks for the responses. > > Chris > > > On Wednesday, August 8, 2012 4:12:04 AM UTC-4, Krzysztof Baranowski wrote: >> >> Hey folks, >> >> So I have an app where all the files are coffeescript. To avoid a js >> compilation step or having to run a watcher I have a >> "require('coffee-script')" statement before everything else in the program, >> which lets me require() coffee files directly from other coffee files. >> >> Problem is, one of the libraries I'm using requires >> up<https://github.com/LearnBoost/up> which >> spawns child processes with fork(). These processes in turn try to >> require() my app files, which are in coffeescript, and fail. >> >> So I'd like a way to ensure that process spawn with coffeescript >> available to avoid this. Or maybe I could monkey patch Up or something. >> >> Into your capable hands I commit my question, nodejs community! >> Chris >> > > On Wednesday, August 8, 2012 4:12:04 AM UTC-4, Krzysztof Baranowski wrote: >> >> Hey folks, >> >> So I have an app where all the files are coffeescript. To avoid a js >> compilation step or having to run a watcher I have a >> "require('coffee-script')" statement before everything else in the program, >> which lets me require() coffee files directly from other coffee files. >> >> Problem is, one of the libraries I'm using requires >> up<https://github.com/LearnBoost/up> which >> spawns child processes with fork(). These processes in turn try to >> require() my app files, which are in coffeescript, and fail. >> >> So I'd like a way to ensure that process spawn with coffeescript >> available to avoid this. Or maybe I could monkey patch Up or something. >> >> Into your capable hands I commit my question, nodejs community! >> Chris >> > > On Wednesday, August 8, 2012 4:12:04 AM UTC-4, Krzysztof Baranowski wrote: >> >> Hey folks, >> >> So I have an app where all the files are coffeescript. To avoid a js >> compilation step or having to run a watcher I have a >> "require('coffee-script')" statement before everything else in the program, >> which lets me require() coffee files directly from other coffee files. >> >> Problem is, one of the libraries I'm using requires >> up<https://github.com/LearnBoost/up> which >> spawns child processes with fork(). These processes in turn try to >> require() my app files, which are in coffeescript, and fail. >> >> So I'd like a way to ensure that process spawn with coffeescript >> available to avoid this. Or maybe I could monkey patch Up or something. >> >> Into your capable hands I commit my question, nodejs community! >> Chris >> > > On Wednesday, August 8, 2012 4:12:04 AM UTC-4, Krzysztof Baranowski wrote: >> >> Hey folks, >> >> So I have an app where all the files are coffeescript. To avoid a js >> compilation step or having to run a watcher I have a >> "require('coffee-script')" statement before everything else in the program, >> which lets me require() coffee files directly from other coffee files. >> >> Problem is, one of the libraries I'm using requires >> up<https://github.com/LearnBoost/up> which >> spawns child processes with fork(). These processes in turn try to >> require() my app files, which are in coffeescript, and fail. >> >> So I'd like a way to ensure that process spawn with coffeescript >> available to avoid this. Or maybe I could monkey patch Up or something. >> >> Into your capable hands I commit my question, nodejs community! >> Chris >> > -- > Job Board: http://jobs.nodejs.org/ > Posting guidelines: > https://github.com/joyent/node/wiki/Mailing-List-Posting-Guidelines > You received this message because you are subscribed to the Google > Groups "nodejs" group. > To post to this group, send email to [email protected] > To unsubscribe from this group, send email to > [email protected] > For more options, visit this group at > http://groups.google.com/group/nodejs?hl=en?hl=en > -- Job Board: http://jobs.nodejs.org/ Posting guidelines: https://github.com/joyent/node/wiki/Mailing-List-Posting-Guidelines You received this message because you are subscribed to the Google Groups "nodejs" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/nodejs?hl=en?hl=en
