2 ms·
criticisms of coffeescript aside (e.g. interstitial whitespace sensitivity), the code can't directly be applied in node (as far as i can tell, you can't tell no
by niggler 14y ago
criticisms of coffeescript aside (e.g. interstitial whitespace sensitivity), the code can't directly be applied in node (as far as i can tell, you can't tell node to run a coffeescript file directly using the `node <script>` syntax -- you have to use a framework or compile to js).
- funkiee 14y agoHow is that really different toolchain-wise from having to compile source code in a language such as Java?
- niggler 14y agoremember: java is to javascript as pain is to painting. it's not an apt comparison. You can directly write javascript and run it in your browser or in node (or test it out interactively in the node REPL). I like to play with modules in node interactively (when relevant) because its easier to see what's going on and much easier to iterate (esp. in conjunction with the .load REPL command)
- chc 14y agoIf you don't want to compile, assuming you have CoffeeScript installed, you can just run it with coffee instead of node and everything else works like normal.
- rcsorensen 14y agoIt can after you install coffee-script. $ echo 'process.stdout.write "Now with CS level #{1 + 2}!"' > foo.coffee $ coffee foo.coffee Now with CS level 3! $
- NuZZ 14y agootf compiling is pretty simple regardless. index.js: require('coffee-script') module.exports = require('app.coffee')
- bdcravens 14y agoCheck out the PeepCode "Full Stack node.js" screencasts - it shows building a full app using CoffeeScript. https://peepcode.com/products/full-stack-nodejs-i https://peepcode.com/products/full-stack-nodejs-i