ºìÁªLinuxÃÅ»§
Linux°ïÖú

CoffeeScript 2.2.2·¢²¼£¬±àÒë³ÉJSµÄСÇÉÓïÑÔ

·¢²¼Ê±¼ä:2018-02-23 09:01:53À´Ô´:ºìÁª×÷Õß:baihuo
CoffeeScript 2.2.2 ÒÑ·¢²¼£¬CoffeeScript 2 ×î´óµÄ±ä»¯ÊÇ£¬CoffeeScript ±àÒëÆ÷»áÉú³ÉÏÖ´ú JavaScript Óï·¨£¨ ES6 »ò ES2015 ¼°ÒÔÉÏ°æ±¾£©¡£Ò»¸ö CoffeeScript =>»á±ä³ÉÒ»¸ö JS => £¬Ò»¸ö CoffeeScript Àà»á±ä³ÉÒ»¸ö JS À࣬µÈµÈ¡£´ËÍ⣬ CoffeeScript 2 ÖеÄÐÂÌØÐÔ»¹°üÀ¨Òì²½¹¦ÄÜºÍ JSX ¡£

ÔÝδ·¢Ïָð汾¸üÐÂÄÚÈÝ£¬Çë±£³Ö¹Ø×¢¡£

# Install locally for a project:
npm install --save-dev coffeescript

# Install globally to execute .coffee files anywhere:
npm install --global coffeescript

ÏÂÔصØÖ·£ºhttps://github.com/jashkenas/coffeescript/releases/tag/2.2.2

CoffeeScript ÊÇÒ»ÃűàÒë³É JavaScript µÄСÇÉÓïÑÔ¡£ÔÚ Java °ã±¿×¾µÄÍâ±íÏ£¬JavaScript ÆäʵÓÐ×ÅÒ»¿Å»ªÀöµÄÐÄÔà¡£CoffeeScript ³¢ÊÔÓüò½àµÄ·½Ê½Õ¹Ê¾ JavaScript ÓÅÐãµÄ²¿·Ö¡£

CoffeeScript µÄÖ¸µ¼Ô­ÔòÊÇ£º"Ëý½ö½öÊÇ JavaScript"¡£´úÂëÒ»Ò»¶ÔÓ¦µØ±àÒëµ½ JS£¬²»»áÔÚ±àÒë¹ý³ÌÖнøÐнâÊÍ¡£ÒÑÓÐµÄ JavaScript Àà¿â¿ÉÒÔÎÞ·ìµØºÍ CoffeeScript ´îÅäʹÓ㬷´Ö®ÒàÈ»¡£±àÒëºóµÄ´úÂëÊǿɶÁµÄ£¬ÇÒ¾­¹ýÃÀ»¯£¬ÄÜÔÚËùÓÐ JavaScript »·¾³ÖÐÔËÐУ¬²¢ÇÒÓ¦¸ÃºÍ¶ÔÓ¦ÊÖдµÄ JavaScript Ò»Ñù¿ì»òÕ߸ü¿ì¡£

À´×Ô:¿ªÔ´ÖйúÉçÇø
ÎÄÕÂÆÀÂÛ

¹²ÓÐ 0 ÌõÆÀÂÛ