Habrã«é¢ããTARSã«é¢ããææ°ãã¥ãŒã¹ãã6ãæãçµéããŸãã ã
TARSã¯ãããããè€éãªãããžã§ã¯ããäœæããããã®ããã³ããšã³ãéçºè ïŒãŸãã¯ããŒã å šäœïŒãæ¯æŽããgulpããŒã¹ã®HTMLã¬ã€ã¢ãŠãã³ã³ãã€ã©ã§ããããšãæãåºãããŠãã ããã éå»6ãæéã§ã88件ã®åé¡ã解決ãã7ã€ã®ããŒãžã§ã³ããªãªãŒã¹ããã CLIãç»å ŽããŸãããyeomanãšã®é¢ä¿ãããŸããããªãã£ããããæ°ããããŒãžã§ã³ãç»å ŽããŸããã TARSã¯githubã®åœŒã®æ°ãã家ã«ç§»ãã4人ã®éçºè ã®ããŒã +å°äººæ°ã®ãã¡ã³ãç²åŸããŸããã ã¡ãªã¿ã«ããªãªãŒã¹åŸã ãã§ãªãããªãªãŒã¹åŸã®å³æãã£ãŒãããã¯ã«æè¬ããŸãã TARSã¯ããã·ã¢ããã³æµ·å€ã®ããã€ãã®Webã¹ã¿ãžãªã§çŽ¹ä»ãããŠããŸãã ã³ã¬ã¯ã¿ãŒã¯ã12ãè¶ ããéçºè ã«ã³ã³ããŒãã³ãã¢ãããŒããæããã¬ã€ã¢ãŠãã«ãŒãã³å šäœãæãã人ã ãããã³ããšã³ãã®ã©ã³ã¯ã«åŒãä»ããŸããã äžè¬ã«ãå€ãã®æ°ãããã®ãç»å ŽããŸãããããã«ã€ããŠã話ããããšæããŸãã
èšäºã®å°ããªæŠèŠïŒ
- TARSãšã¯äœããç°¡åã«æãåºããŠãã ããã
- ææ°ã®è©±ã
- ãã誀解ãããããšã«ã€ããŠè©±ããŸãããã TARSã䜿çšããŠæ倧éã«æŽ»çšããæ¹æ³ã
- ä»åŸã®ãããžã§ã¯ããåŸ ã£ãŠãããã®;
- æè¬ã®èšèã
TARSãšã¯äœã§ããïŒ
ãŸããTARSãšã¯äœããšãã質åã«ããã詳ããçããŸãã ååã®èšäºããã®å°ããªã³ããŒã¢ã³ãããŒã¹ãïŒãTARSã¯ãã»ãšãã©ã®ããã³ããšã³ãã¿ã¹ã¯ãèªååããããã®äžçŸ€ã®ã¿ã¹ã¯+äœãã足ããªãå Žåã«æ°ããã¿ã¹ã¯ãç°¡åã«è¿œå ããæ©èœã§ãã TARSã¯ãgulpãã¬ãŒã ã¯ãŒã¯ãšåŒã¶ããšãã§ããŸãã åã ã®éçºè ãšå€§èŠæš¡ãªããŒã ã®äž¡æ¹ã«é©ããŠããŸãã ããã«ãããçéžãã巚倧ãªããŒã¿ã«ãŸã§ãããããè€éãªãããžã§ã¯ããç°¡åã«éçºã§ããŸãã ãªãã·ã§ã³ã§äœæããããã¹ãŠã®ãã®ããã¹ãŠã®ã³ãŒããšãŠãŒã¹ã±ãŒã¹ãææžåãããŠãããããgulpã®ä»çµã¿ãç¥ãå¿ èŠãããããŸããã
FrontTalksã§ã®ä»¥åã®èšäºãšããã©ãŒãã³ã¹ã®èšé²ãããããå€ãã®æ å ±ãå ¥æã§ããŸãã
æ°æ©èœ
ãŸããç§ã¯èšããŸãïŒ1ã€ã®ã¡ãžã£ãŒããŒãžã§ã³å ã§ãããžã§ã¯ãã®100ïŒ ã®äºææ§ãä¿èšŒãããŠãããããããããããŒãžã§ã³ã®TARSã§ãã¥ãŒã¹ã䜿çšããŸãã ãããžã§ã¯ãããã¥ã¡ã³ãã®æŽæ°ã¬ã€ãã
äž»ãªç®æ°ããã¯ãTARSã®CLIã§ãã CLIã®åã«TARSãããžã§ã¯ããè¡šãããã®ïŒãããžã§ã¯ããã¡ã€ã«+ TARSã®ãã¹ãŠã®node_modulesã ãã¹ãŠã®ãããžã§ã¯ãã§ããã§ãã åãµã€ãºã¯250 MBã«å¢å ãã5ã€ä»¥äžã®ãããžã§ã¯ããããå Žåã¯éåžžã«äžäŸ¿ã§ããããWindowsã§æ°ãããããžã§ã¯ããäœæãããšãäŸåé¢ä¿ã5å以äžã€ã³ã¹ããŒã«ãããŸããã
ã³ãã³ãã®ååãããŒã®ååãèŠããŠããå¿ èŠãããã䜿çšãããããŒã®æ£ç¢ºæ§ãäžç·ã«äœ¿çšã§ãããã®ãšããã§ãªããã®ã®æ€èšŒã¯ãããŸããã§ããã äžè¬ã«ãTARSã¯1ã€ã®ã«ãŒãã³ãåé€ãããããã«ç°ãªãã«ãŒãã³ãè¿œå ããŸããã ãããä¿®æ£ããããã«ã TARS-CLIãäœæããŸããã
TARS-CLI-npm-packageïŒã°ããŒãã«ã«ã€ã³ã¹ããŒã«ïŒãããã«ããã次ã®ããšãå¯èœã«ãªããŸãã
- ãããžã§ã¯ããé¢äžããã;
- ãããžã§ã¯ãã®ã¢ã»ã³ããªïŒä¹å¥³ãšãªãªãŒã¹ã®äž¡æ¹ïŒã®ã¿ã¹ã¯ãå®è¡ããŸãã
- å¥ã®ãã¡ã€ã«ãšãã©ã«ããŒã®ã»ããã䜿çšããŠã¢ãžã¥ãŒã«ããããžã§ã¯ãã«è¿œå ãããšãæåã§è¡ãå¿ èŠããªããªããŸãã
- ãããžã§ã¯ãã«ããŒãžãè¿œå ããŸããæ¢åã®ãã³ãã¬ãŒãã®ã³ããŒã§ãããå®å šã«ç©ºã§ãã
- çŸåšã®ãã£ã¬ã¯ããªã«ããgulpfile.jsããã¿ã¹ã¯ãå®è¡ããŸãã
誀ã£ããã©ã°ã§ã³ãã³ããå®è¡ãããšããšã©ãŒã¡ãã»ãŒãžã衚瀺ãããŸãã ãããžã§ã¯ããåæåãããšãã«ãæã§tars-config.jsãç·šéããå¿ èŠããªããªããéåžžã«äŸ¿å©ãªïŒã³ã³ãœãŒã«çšïŒã€ã³ã¿ãŒãã§ãŒã¹ã§ããã€ãã®è³ªåã«çããã ãã§ãã åæã«ãæ¯ååäœã¢ãŒããéžæããããªãå Žåãèªåãã¹ããå®è¡ããããªãå Žåã¯ããã©ã°ã䜿çšããŠäœæ¥ãä¿åããŸããã TARSãšåæ§ã«ãTARS-CLIã«ã¯2ã€ã®èšèªïŒ ãã·ã¢èªãšè±èªïŒã®åªããããã¥ã¡ã³ãããããŸãã ïŒCLIãšã¡ã€ã³ãããžã§ã¯ãã®äž¡æ¹ã®ïŒããã¥ã¡ã³ãã®è±èªãžã®ç¿»èš³ãæ°ãããã®ã§ãã 移ç±ã®çç±-TARSã¯ããã§ã³å ±ååœãã¢ã¡ãªã«ãåã¢ã¡ãªã«ã®éçºè ã«èå³ãæã£ãŠããŸãã è±èªã®ããã¥ã¡ã³ãããªãããšã¯ç¢ºãã§ã¯ãããŸããã
æãéèŠãªå€æŽã®äžè¬çãªãªã¹ãïŒ
- Babelã®ãµããŒããè¿œå ãããŸããã
- ã¹ã¿ã€ã«ãé£çµãããŠãããšããäºå®ã«ãããããããã€ã³ããŒããsourcemapsãã£ã¬ã¯ãã£ãããµããŒããããŠããŸãã
- PostCSSã®ãµããŒããè¿œå ãããŸããã
- çµã¿ç«ãŠããã»ã¹ãå éããŸããã
- å€ãã®ãã°ãã¯ãªã¢ããæ·±å»ãªãªãã¡ã¯ã¿ãªã³ã°ãå®æœããå€ãã®äŸ¿å©ãªå°ããªãã®ãè¿œå ããŸããã
å®éã å€æŽã®ãªã¹ãã¯ã¯ããã«å€§ãããªã£ãŠããŸãã æ°èŠãŠãŒã¶ãŒã¯TARSã®éçºã«è¯ã圱é¿ãäžããŸããã æ°ããã¢ã€ãã¢ãå®è£ ãããã«ãªã¯ãšã¹ããåãå ¥ããTARSã®éçºè ã®1人ã2GISã§ä»äºãåŸãŸããã
ãŸããåãªãªãŒã¹ãWindowsãLinuxãããã³OS Xã§ã®èªåãã¹ããçµãŠãããä¿¡é Œæ§ã®é«ãã³ãŒããçæã§ããããã«ãªã£ãããšã«èšåãã䟡å€ããããŸãã ã¢ã»ã³ããªã®ã¹ããŒã¿ã¹ã¯ããããžã§ã¯ãã®readmeã®ãããžã«è¡šç€ºãããŸãã
ã¡ãªã¿ã«ãã³ã¬ã¯ã¿ãŒã¯Cordovaäžã®ã¢ããªã±ãŒã·ã§ã³ããã©ãŠã¶ãŒã®æ¡åŒµæ©èœãªã©ã®éçºã«äœ¿çšãããŠããŸãã
ãããã質å
éçºã«ã¯ãTARS-CLIã䜿çšããããšããå§ãããŸãã ãµãŒããŒã§ãããžã§ã¯ãã®ãã«ããç·Žç¿ããå Žåã¯ãTARSãåå¥ã«äœ¿çšããŠãã ããã ãã®å Žåãã°ããŒãã«ãªäŸåé¢ä¿ã¯ãããŸããã ãããã誰ãTARS-CLIã䜿çšããããšãæ°ã«ããŸããã
TARS-CLIã§ä»»æã®TARSã¢ã»ã³ããªã䜿çšã§ããŸãã åå²ããã¿ã¹ã¯ãè¿œå ããã³ã¬ã¯ã¿ãŒãå€æŽããŠããŒãºãæºãããŸãã ãããžã§ã¯ããã¢ã¯ãã£ãã«ããã«ã¯ã次ãå®è¡ããŸãã
tars init -s http://url.to.zip.with.tars
ãããã£ãŠãTARS-CLIã¯TARSãžã®ã€ã³ã¿ãŒãã§ãŒã¹ã§ãããããã«ããã¯ããã«äŸ¿å©ã«ãªããŸããã 次ã«ãã¡ãŒã«ãŸãã¯ãŽãã§åãåã£ãæãäžè¬çãªè³ªåãšèª€è§£ã«ç§»ããŸãããã
質å ïŒãå£ãããã©ããã«ãšã©ãŸãããšãæããã«TARSã䜿çšã§ããŸããïŒ ãããžã§ã¯ãã¯äžæ¢ãããŸããïŒ
åç ïŒæããããšãªãééããªã䜿çšã§ããŸãã åé¡ã¯çºçããå¯èœæ§ããããŸããããã¹ãŠè§£æ±ºå¯èœã§ãã ææªã®ã·ããªãªã§ã¯ãç§ãã¡ã®ããŒã ã¯ããªãã®ãããžã§ã¯ããæ§ç¯ãããããéµäŸ¿ã§ããªãã«éãããšãã§ããŸãã è¿ãå°æ¥ãããŒã«ã«ã§äœãåé¡ãçºçããå Žåã«ãªã³ã©ã€ã³ãã«ããµãŒãã¹ãäœæããäºå®ã§ãã ç§ãã¡ã¯ééããªããããžã§ã¯ããã¹ããŒããã€ããã¯ãããŸãããæ¯é±æ°ããåé¡ãããã2çªç®ã®ããŒãžã§ã³ã錻ã«ãããŸãã ç§ãã¡ãããªããéå±ããŸããã npmã®çµ±èšã«ãããšãå æãTARS-CLIã¯1,000人以äžãé ä¿¡ããŸããã
質å ïŒç§ãã¡ã®ããŒã ã«ã¯ãç¬èªã®ã¬ã«ã/ã°ã©ã³ãã³ã¬ã¯ã¿ãŒãããŸããTARSã§ã®çµéšã掻çšããããšæããŸãã
åç ïŒå¿ èŠãªã¿ã¹ã¯ããŠãŒã¶ãŒã¿ã¹ã¯ã«è»¢éã§ããŸãã gruntã¿ã¹ã¯ã䜿çšããããã«ãgulpã«æžãçŽããããªãå Žåã¯ã gulp㧠gruntã¿ã¹ã¯ãå®è¡ããgulp-gruntããã±ãŒãžããããŸãã ããã§ããç§ãã¡ã¯ç¡éªšãªã¿ã¹ã¯ãgulpã«ç§»æ€ããããšããå§ãããŸãã ããã«ããã¹ãŠã®gruntãã©ã°ã€ã³ã¯gulpã§å©çšå¯èœã§ãã ãããžã§ã¯ãã«ãããã®è¿œå ã¿ã¹ã¯ãåžžã«é£çµ¡ããããå Žåã¯ãTARSã®ãã©ãŒã¯ãäœæããå¿ èŠãªå€æŽãè¿œå ããŠããã©ãŒã¯ãžã®ãªã³ã¯ããããžã§ã¯ãã«éç¥ããããšããå§ãããŸãã åæã«ããã©ãŒã¯ã®æŽæ°ãç°¡åã«ããããã«ããã¹ãŠã®ã«ã¹ã¿ã ã¿ã¹ã¯ããŠãŒã¶ãŒã¿ã¹ã¯ã«è¿œå ãããããã®ã¿ã¹ã¯ã®äŸåé¢ä¿ãuser-package.jsonã§æå®ããå¿ èŠããããŸãã ãããã¯æäžããããã¹ãŠã®ãããžã§ã¯ãã§èšå®ãããŸãã
ããã«ãã¿ã¹ã¯ãå€æ°ã®éçºè ã«åœ¹ç«ã€å Žåã¯ããã«ãªã¯ãšã¹ããè¡ããããé¡ãããŸãã åŒç€Ÿãšã®é£æºæ¹æ³ã®èª¬æã¯ãã¡ãããã芧ããã ããŸã ã
質å ïŒTARSã䜿çšããŠéçºããã»ã¹ãæ§ç¯ããæè¯ã®æ¹æ³ã¯äœã§ããïŒ
åç ïŒããã«ã¯åäžã®åçã¯ãããŸããã ããã¯ãã¹ãŠãéçºã®è©³çŽ°ã«äŸåããŸãã
ããã€ãã®ã¿ã€ãã®ãããžã§ã¯ããæ€èšããŠãã ããã
- é·ããã¬ã€ãããŠããŒã¯ã ãã®å Žåããã¹ãŠãç°¡åã§ãã ã¢ãžã¥ãŒã«ãããŒãžãäœæãããã¹ãŠã®CVSã«ãã¹ãŠãä¿åããŸã-äžè¬ã«ããã®ã¹ã¯ãªããã¯æãéå±ã§ãã
- å埩æ©èœãåããå€ãã®ãããžã§ã¯ãã ãã®å ŽåãTARSã䜿çšããã«ã¯ããã€ãã®æ¹æ³ããããŸãã
- åå©çšãããã¯ã®ã©ã€ãã©ãªãäœæããããã«ç¬èªã®TARSã®ãã©ãŒã¯ã«å«ããŸãã ãããã£ãŠãæ°ãããããžã§ã¯ããèµ·åããããšãããã«å¿ èŠãªãã¹ãŠã®ãããã¯ãå«ãŸããŸãã
- gitãŸãã¯ãã®ä»ã®CVSã䜿çšããŸãã ã¿ãŒã«åãããTARSãgitã«ãããããããã®æ°ãããããžã§ã¯ããå¥ã ã®ãã©ã³ãã§ãããšããŸãã
- éè€ãããã¯ã®ã©ã€ãã©ãªãåå¥ã«ä¿ç®¡ããŠãã ããã
æåã®ãªãã·ã§ã³ãæã䟿å©ã§ãã ãã ãããã®å Žåããã©ãŒã¯ã®ç¶æ ãç£èŠããå ã®ãªããžããªããã¿ã€ã ãªãŒã«å€æŽãååŸããå¿ èŠããããŸãã
- å€ãã®ç°ãªããããžã§ã¯ãã ãŸããåãããžã§ã¯ããgitïŒãŸãã¯å¥ã®CVSïŒã®åå¥ã®ãªããžããªã«ããããšãã§ããéåžžã«åçŽãªã·ããªãªã
äžèšã®æ¹æ³ã¯å®èª¬ã§ã¯ãããŸããããTARSããããå€ãã®ã¡ãªãããåŸãæ¹æ³ã®äŸã«ãããŸããã
質å ïŒããªããæäŸããæè¡ã¹ã¿ãã¯ã¯åäžçŽã®ããã§ãã ãã¹ãŠãæ¢ã«webpackã«ç§»åãããŠãããã¹ã¯ãªããã¯gulp / grunt / broccoli /äœãããã«npmãå®è¡ããŸãã
åç ïŒåãgulpã®githubã®æã®æ°ãwebpackã®2å以äžã§ãããšããäºå®ããå§ããŸãããã å€ããªã£ãgulpã®åŒã³åºãã¯ãå°ãªããšãæ£ãããããŸããã åã¿ã¹ã¯ã«ã¯ç¬èªã®ããŒã«ããããŸãã
éåžžã«åçŽãªãããžã§ã¯ãã®å Žåãã¹ã¿ã€ã«ãæ¥çããŠjsãå§çž®ããã ãã§ããã¹ãŠãèªåã§èšè¿°ããŠnpmã§å®è¡ã§ããŸãã ãããŠãããªãã¯ããã«æéãç¡é§ã«ããŠãããžã§ã¯ãèªäœã«åŸäºããããšã¯ã§ãããä»ã®ãã¹ãŠããããã®ããŒãºã®ããã«äœãããããŒã«ã«ä»»ããããšã¯ã§ããŸããã å®éãéçºè ãããã±ãŒãžãããŒãžã£ãŒãã¿ã¹ã¯ã©ã³ããŒãšããŠäœ¿çšããæºåãã§ããŠããã®ã¯é©ãã¹ãããšã§ãã ããããããã¯ãã§ã«äžåã§ãã
webpackã®è³ªåã«æ»ããŸãã webpackã§gulpã䜿çšããããšã劚ãããã®ã¯äœããããŸããã å®éã«ã¯ãwebpackãŸãã¯browserifyã®ãããããå®è£ ããèšç»ããããŸãã
質å ïŒæ確ãªãã®ã¯äœããªããããã€ãã®ã¢ãžã¥ãŒã«ãããŒãžããšã©ãŒã®æãäœã眮ãããŠããªããäœãèµ·ãã£ãŠããã®ãïŒ
åç ïŒ ãã·ã¢èªãŸãã¯è±èªã®ããã¥ã¡ã³ããèªãã§ãã ããã ãŸãã¯ãtars.builder @ gmail.comãŸãã¯ãã£ããã«ãŒã ã®gitterã«æžã蟌ã¿ãŸãã ãã¹ãŠããã«ä¿®æ£ããŸãã ãã£ãŒãããã¯ã¯ãŸã£ããäžèŠã§ãã®ã§ãã³ã¬ã¯ã¿ãŒã®äœæ¥ã§ãšã©ãŒãèŠã€ããå Žåã¯å ±åããŠãã ãã
ä»åŸã®èšç»
ãããªãèšç»ã«ã€ããŠã¯ã githubã§ãã©ããŒã¢ããããŠãã ããã ããã§ãããžã§ã¯ãã«åœ±é¿ãäžããããšãã§ããŸãã ç§ãã¡ã¯åžžã«æ°ããã¢ã€ãã¢ãåãã§ããŸãã
è¿ãå°æ¥ã次ã®ããšãèšç»ããŸãã
- ããã¢ãŒã·ã§ã³ãµã€ããäœæããŸãã
- webpackãbrowserifyãä»ã®äœã;
- gulpããªãªãŒã¹ããããã4çªç®ã®ããŒãžã§ã³ã«ç§»åããŸãã
- Reactã¢ããªã±ãŒã·ã§ã³ãæ§ç¯ããæ©äŒãäžããŸãã
- ã³ã¬ã¯ã¿ãŒã®ãªã³ã©ã€ã³ããŒãžã§ã³ãäœæããŸãã
- TARSã®2çªç®ã®ããŒãžã§ã³ã®äœæ¥ãéå§ããŸãã
- TARSãã©ã°ã€ã³ã®ã€ã³ãã©ã¹ãã©ã¯ãã£ãäœæããŸãã
æåŸã®2ã€ã®ã¢ã€ãã¢ã¯æãèå³æ·±ããã®ã§ãã 2çªç®ã®ããŒãžã§ã³ã§ãã¹ãŠãæ確ã§ãªãå Žåã¯ããã§ã«ãã©ã°ã€ã³ã«ã€ããŠè©±ãããšãã§ããŸãã ãã©ã°ã€ã³ã·ã¹ãã -ãçããã¿ã¹ã¯ã解決ããããã«å¿ èŠãªTARSãžã®ããŸããŸãªè¿œå ã æãç°¡åãªäŸã¯ãæåãæ€åããã¿ã¹ã¯ã§ãã tars install tars-emailãšå ¥åããã ãã§ãé»åã¡ãŒã«ã®ã¬ã€ã¢ãŠãã§å¿«é©ã«äœæ¥ã§ããããã«ã¿ã¹ã¯ãããŒã«ã«ã®TARSã«ããŒãããããšæ³åããŠãã ããã
è¿ãå°æ¥ãç§ãã¡ã¯TARSã«è©±ãããšãæããŸãã çã®åæé³å£°ãMacããã³Linuxã®ã¿ã 圌ã«ãã£ã©ã¯ã¿ãŒãè¿œå ããŠãç®èãæããŸãããã åœç¶ãããã¯ãã¹ãŠãªãã·ã§ã³ã§ããæ²é»ãå¿ èŠãªå Žåã¯ãæ§æã®1ã€ã®ãªãã·ã§ã³ãå€æŽããã ãã§ãã
ã¯ã¬ãžãã
æåŸã«æè¬ããŸãïŒããã¥ã¡ã³ããšãã®ç¿»èš³ã®éªšã®æããä»äºã«Lence_l ãjsã¿ã¹ã¯ã«åãçµãã§ããowanturist ãçŽ æŽãããã¢ã€ãã¢ãšéçºæ¯æŽãæ±ããŠãã³ã¬ã¯ã¿ãŒã®æ¬¡ã®ããŒãžã§ã³ã®ãªãªãŒã¹åŸãã³ã¬ã¯ã¿ãŒã®æ¬¡ã®ããŒãžã§ã³ã®ãªãªãŒã¹åŸãçŽ æŽãããã¢ã€ãã¢ãšãµããŒãã®ããã«ãã¹ãŠã®äººã«ã
䜿çšãåå²ãgithubã«æå°ãä»ããTARSã䜿çšããŠããã³ããšã³ãã«ãŒãã³ã®ã¬ãã«ãäžãç¶ããŸãã