त्वरित और गंदे समाधान: कंसोल ध्वज -b
(नंगे) का उपयोग करें। चेतावनी: अगर आप ऐसा करते हैं तो बिल्ली के बच्चे मर जाएंगे!
स्वच्छ समाधान: ऐसा न करें।
Usage: coffee [options] path/to/script.coffee
-c, --compile compile to JavaScript and save as .js files
-i, --interactive run an interactive CoffeeScript REPL
-o, --output set the directory for compiled JavaScript
-j, --join concatenate the scripts before compiling
-w, --watch watch scripts for changes, and recompile
-p, --print print the compiled JavaScript to stdout
-l, --lint pipe the compiled JavaScript through JSLint
-s, --stdio listen for and compile scripts over stdio
-e, --eval compile a string from the command line
-r, --require require a library before executing your script
-b, --bare compile without the top-level function wrapper
-t, --tokens print the tokens that the lexer produces
-n, --nodes print the parse tree that Jison produces
--nodejs pass options through to the "node" binary
-v, --version display CoffeeScript version
-h, --help display this help message
आपको _really_ ऐसा करने से बचना चाहिए। आप नहीं चाहते हैं कि आपके स्थानीय चर वैश्विक स्तर पर रिसाव करें। – shesek
@shesek शायद वह एक बंडलर का उपयोग कर रहा है? जो पहले से ही एक गुंजाइश में सबकुछ लपेटता है? या RequJS का उपयोग करता है? मुझे लगता है कि रैपर स्कोप वैकल्पिक होना चाहिए। – benqus
@ बेंकस - सहमत हैं, मैं या तो अपने स्वयं के आवरण का उपयोग करता हूं या उदाहरण के लिए गंदगी का उपयोग करके एक बड़ी रैपर में एकाधिक फ़ाइलों को गठबंधन करता हूं। लेकिन अन्यथा अगर आप इसे बदसूरत या कुछ पाते हैं, तो आपको इसे छोड़ना नहीं चाहिए। –