You signed in with another tab or window. Reload to refresh your session. You signed out in another tab or window. Reload to refresh your session. You switched accounts on another tab or window. Reload to refresh your session. Dismiss alert
OSSéçºã«ãããåæå½¢æã«JavaScriptã§åå ããå¤åãèµ·ãã / front-end-lounge-1
ä»ãNode.jsã«èµ·ãã¦ããã¨ãèªãä¸ã§ãio.jsã¯é¿ãã¦éããªã話é¡ã§ãããã ä»åã®Node.js ã¢ããã³ãã«ã¬ã³ãã¼ 2014ã®ç· ãã飾ãããã«ããã®io.jsã«ã¤ãã¦åãç¥ã£ã¦ããéãã®äºãã¾ã¨ãã¦æ¸ããã¨ã«ãã¾ãã io.jsãç¥ããä»å¾"Node"ãã©ããªã£ã¦ããã®ããçã§ä¸ç·ã«èãã¦ããã¾ãããã ã¾ããã®ä¸é£ã®io.jsã®forké¨åã¯OSSã¨ããç¹æ®ãªããã¸ã§ã¯ããã©ãé²ãã¦ããã®ããããã¼ãªã®ããç¥ãä¸ã¤ã®ææã ã¨æãã¾ãã OSSã«é¢ãã£ã¦ããçãããä»åãé·ãã§ãããæå¾ã¾ã§èªãã§ããããã¨å¹¸ãã§ãã io.js ã¨ã¯ä½ã Node.jsã®Forkã§ãã次ã®Node.jsã®å®å®çã«ãªããv0.12ãForkãã¦ãã¾ãããã¢ã¤ã»ãªã¼ ã¸ã§ã¤ã¨ã¹ãã¨èªã¿ã¾ããååã®ç±æ¥ã¯æ¨æã«ããåçªç®ã«å¤§ããªè¡æã®ååããåããã¾ããã*1 Nodeã使ã£ã¦ãã人ã®ãã¨ãnod
ãªããæè¿Twitterã¨ãè·å ´ã§ããnpmã®æ©è½ã§ãããªã®ãã£ããã ãã£ã¦è¨ããããã¨å¤ãã®ã§ã説æãã¦ããã¾ãã ã¡ãªã¿ã«ã¿ã¤ãã«ã«ã¨ãããã10é¸ã£ã¦æ¸ãããã©ãããã¾ãããããæãã¤ãã¦ãªãã®ã«ã10é¸ã£ã¦æ¸ãã¦ãã¾ã£ãã®ã§æå¾ã®æ¹ã¯å¾®å¦ããããã¾ããã 1. npm install㯠npm i ã§ãåããã¨ãã§ãã ã¾ãåç´ãªã·ã§ã¼ãã«ããã§ãããisntallã¨ãtypoãã¦ã¦ã空æ°èªãã§ããããã§ãããçãã»ããããããã£ã¦ãã¨ã§ã # npm installã£ã¦æ¸ãã®ã $ npm install socket.io #npm i ã£ã¦æ¸ãã®ãåã $ npm i socket.io # ã¡ãªã¿ã« --save㯠-S, --save-dev㯠-D ã«ã§ãã $ npm i socket.io -S $ npm i mocha -Dã·ã§ã¼ãã«ããå°ãã¿ã 2. npm
Browserify ã触ã£ã¦ã¿ãã¡ã¢ã Browserify ã¨ã¯ CommonJS ã®ã¢ã¸ã¥ã¼ã«ã®ä»çµã¿ãã¤ã¾ã Node.js ã® require ããã©ã¦ã¶ä¸ã§ã使ããããã«ãããã®ãã¨ãããã¨ã§ããã¿ãããReadme ãèªãéãã¯ãnpm ã«ããã¢ã¸ã¥ã¼ã«ããã©ã¦ã¶ä¸ã«ãã£ã¦ããããã«ä½ããå§ãããããªå°è±¡ããããããã¡ã¾ãã®ã¨ã³ããªã¼ãã¿ã¦ãã㨠AMD ã«ä»£ããã« CommonJS ã§ããã³ãã¨ã³ãã®ä¾åé¢ä¿ã®ç®¡çããã (RequireJS ã§ã¯ãªããNode.js æè¦ã§ require é¢æ°ãããã³ãã¨ã³ãã§ä½¿ã) ããã®ãã¼ã«ã¨ãã¦ã使ã£ã¦ããããã ã ããããã㨠è¤æ°ã® js ãã¡ã¤ã«ã®ä¾åé¢ä¿ãè¨è¿°ããã æçµçã«ãä¾åé¢ä¿ãèæ ®ããé çªã§ãã²ã¨ã¤ã® js ãã¡ã¤ã«ã«çµåããã ä½ãããã®ã¯ç¬¬ä¸è ã®ãµã¤ãã«åãè¾¼ãã§ãããã¹ã¯ãªãã (ãµã¼ããã¼ãã£ã¹ã¯ãªãã
ç¸å¤ãããä»äºã§ã¯ãã¶ã¤ã³ããã¤ã¤JavaScriptæ¸ãã¦ããã ã¿ã¹ã¯ã©ã³ãã¼ã¨ãã¦Grunt.jsã使ã£ã¦ããããã©ãã使ããã¡ã«æ®µã ä¸æºãã§ã¦ãããé ãã£ãããè¨è¿°ãåé·ã«ãªããã¡ã§ã¤ããã£ãã®ã§æè¿ã«ãªã£ã¦gulpã«ä¹ãæããã gulpã¯è¯ããã¿ã¹ã¯ã¯èªåçã«ä¸¦åã«å®è¡ããããã¤ã¹ããªã¼ã ã§å¦çãããã®ã§éãããã¿ã¹ã¯ã®è¨è¿°ãã¹ããªã¼ã ãã¼ã¹ã®æ¸ãæ¹ã®ãããã§Grunt.jsã«æ¯ã¹ãã¨ã ãã¶çããªãã ãã ããããã«ããgulpãã¡ãã£ã¨è©¦ããã ãã®æ¥æ¬èªã®è¨äºãããã¥ã¡ã³ããã¿ã¦ã¦ãå®éã®ããã¸ã§ã¯ãã§ä½¿ããã¬ãã«ã¾ã§ã®ç¥èãå¾ãããå¦ç¿ã«ä¸æ¥ããã£ãã ãã®è¨äºã§ã¯ãgulpãã¾ã¨ãã«ä½¿ããããã«ãªãã¾ã§ã«å¿ è¦ãªç¥èãæ¸ãã å°å ¥ã¨HelloWorld ã¾ãã¯å°å ¥ãnpmããgulpãã¤ã³ã¹ãã¼ã«ããã $ npm install gulp -g $ gulp -v [gu
ã½ããã¦ã§ã¢ãæ£ããç解ããå¯ä¸ã®æ¹æ³ã¯ã³ã¼ããèªããã¨ã§ãã ããã¥ã¡ã³ããèªãã°ãã®ã½ããã¦ã§ã¢ãä½ãå®è£ ãã¦ãããåããã¾ãããã©ã®ããã«å®è£ ããã¦ãããã¾ã§ã¯åããã¾ããã éçºä¸ã«ä½ããã®ãã©ãã«ã«æ©ã¾ãããã¨ãããå¹ççãªã³ã¼ãã£ã³ã°ããããã¨æã£ãã¨ããä¸ä½ã¬ã¤ã¤ã®ã½ããã¦ã§ã¢ãç解ãã¦ããã°ç´ æ©ã対å¦ã§ããã·ã¼ã³ãå¤ãããã¾ãã ãã ãã³ã¼ããèªããã¨ã¯ç°¡åãªã¿ã¹ã¯ã§ã¯ããã¾ããã ç¾ä»£çãªã½ããã¦ã§ã¢ã¯ãããªãã®è¦æ¨¡ã®ã³ã¼ããå«ãã§ãããã¨ãã»ã¨ãã©ã§ããã¢ã¼ããã¯ãã£éã®å·®ç°ãå¸åããããã®ã³ã¼ããªã©ãæ¬è³ªçãªæ©è½ãç解ããä¸ã§ã¯ãã¾ãéè¦ã§ã¯ãªãã³ã¼ããå«ã¾ãã¦ãã¾ãã ä½ããã®åé¡ãçºçãã¦ããã³ã¼ããèªããã¨æã£ã¦ããæºåãªãã§ã¯é¢é£ããç®æãæ¢ãã ãã§ããªãã®å´åãå¿ è¦ãªä½æ¥ã¨ãªãã¾ãã å¾ã£ã¦ãæ®æ®µããã³ã¼ããèªãã§ãããã¨ãéè¦ã§ãã ã¾ããã³ã¼ããèªãã«ã
ãªãªã¼ã¹ãé害æ å ±ãªã©ã®ãµã¼ãã¹ã®ãç¥ãã
ææ°ã®äººæ°ã¨ã³ããªã¼ã®é ä¿¡
å¦çãå®è¡ä¸ã§ã
j次ã®ããã¯ãã¼ã¯
kåã®ããã¯ãã¼ã¯
lãã¨ã§èªã
eã³ã¡ã³ãä¸è¦§ãéã
oãã¼ã¸ãéã
{{#tags}}- {{label}}
{{/tags}}