4

New to node. Can somebody help me understand how to use/configure r.js with coffeescript in a nodejs app?

To elaborate, I'm a little lost on a few things. Where to include r.js in the project. A simple use case of require and define with r.js. Where to include cs-require in the source. Which parts can be installed with npm install I asked this question earlier but it seemed as though I was asking 10 questions so I was trying to be more concise. I was hoping someone could point me to an example git because I'm having a hard time finding any.

Thanks

4

1 回答 1

1

You should be able to install requirejs via

npm install requirejs

then you can use it's built-in 'r' function via the executable:

node_modules/bin/r

which you'll probably want to use as part of your backend build-script.

于 2012-05-06T03:00:11.600 回答