ï¼2017/08/28追è¨ï¼ ãã®è¨äºã¯ webpack v1 ç³»ã§ã® config ã«ã¤ãã¦æ¸ããã¦ãã¾ãã v2 系以éã¯ä¸é¨ã®é ç®åãªã©ã«å¤æ´ãããã¾ãã Migrating from v1 to v2 ãèªã㧠v2 ç³»ã¸ã®ç§»è¡ãè¡ãããã¾ãã¯ç§ã®ãªãã¸ããªãåèã«ãã¦ãã ããã https://github.com/zaki-yama/react-redux-template https://github.com/zaki-yama/redux-express-template ï¼è¿½è¨ããã¾ã§ï¼ ã¯ããã« webpack ã使ã£ã JS/CSS ã®ãã«ããè¡ãå ´åãwebpack.config.js ã¨ããè¨å®ãã¡ã¤ã«ãç¨æãã¦ã³ãã³ãèªä½ã¯ webpack ã§æ¸ã¾ãããã¨ãã»ã¨ãã©ã ã¨æãã¾ãã å ¬å¼ãã¥ã¼ããªã¢ã«ã§ã webpack.config.js ã«ã¤ãã¦ã¯å°ããã触ã
ãã¯ããã°ãã¡ã¯!! å°¾è¤ a.k.a. BTOã§ãã UUUMã§ã¯æ¥åã®å¹çæ¹åã« kintone ãå°å ¥ãããã¨ãã¦ããã®ã§ãããkintone ã®æ©è½ãæ¡å¼µããã«ã¯ Javascript ã§ããã°ã©ã ãæ¸ãå¿ è¦ãããã¾ãã ããã§ãJavascript ã®éçºç°å¢ãæ§ç¯ããã®ã§ãä½ããã£ãã®ããã¾ã¨ãã¦ã¿ã¾ããã å ·ä½çã«ã¯ã Babelã§ES6ã§æ¸ãã¦ãwebpackã§ãã«ããã¦ãmochaã§ãã¹ãæ¸ãã¦ãpower-assertã§assertã®åºåãè¦ããããã¦ãkarmaã§è¤æ°ãã©ã¦ã¶ã®ãã¹ããèªååãã¦ãã«ãã¬ãã¸ãåºåããããã«ãã¾ããã ãåã¯ä½ãè¨ã£ã¦ãããã ã¨æãããããã¾ããããåãä½ãè¨ã£ã¦ããã®ããããã¾ããã Babel è¨ããã¨ç¥ãã ES6 ç¨ã®ãã©ã³ã¹ãã¤ã«ãã¼ã«ã§ãã ãåç¥ã®æ¹ãå¤ãã¨æãã®ã§ã詳細ã¯å²æãã¾ããã Babel ã®å°å ¥ã¯ npm ã§ã¤
èªåã¯Reactã®ãã«ãã«Browserifyã主ã«ä½¿ç¨ãã¦ãããæ¨å¹´ã«ã¯ãReactãnpmã§ãã«ãããæ¹æ³ browserify (watchify) + babelifyç·¨ãã¨ããè¨äºãæ¸ãã¾ããããã ãããæè¿ã®webpackã®äººæ°ã£ã·ãã¯ããã¾ãããã®ãããããReact + webpackãã¨ããçµã¿åãããä»å¾ã®ã¹ã¿ã³ãã¼ãã«ãªã£ã¦ããããããªãã¨ããç¶æ³ãªã®ã§ãä»åã¯webpackã§Reactããã«ãããæ¹æ³ãã¾ã¨ãã¦ã¿ã¾ããã webpackã¨ã¯ webpackã¯ãbrowserifyã¨åæ§ãè¤æ°ã®ãã¡ã¤ã«ã®ä¾åé¢ä¿ãé¡§æ ®ãã¦ãã«ããè¡ããã¼ã«ã§ããBrowserifyã¨ã®å¤§ããªéãã¯ã対象ã¨ãªãã®ãJSãã¡ã¤ã«ã ãã§ãªããCSSãã¡ã¤ã«ãç»åãªã©ã«åã¶ã¨ããã¨ããã§ãããããã¾ãæçµçã«çæãããã¡ã¤ã«ãè¤æ°ã«ããããã¨ãã§ããããã¾ãããã©ã°ã¤ã³ããã§ã«å«ã¾ãã¦ããã
ä»å¹´2015å¹´6æã«JavaScriptã®æ¨æºä»æ§ã§ããECMAScript 2015ï¼ES2015 / ES6ï¼ãæ£å¼ã«ãªãªã¼ã¹ãããããã³ãã¨ã³ãçéã§ã¯ããªãçãä¸ãã£ã¦ãã¦ãã¾ããå æ¥ã®HTML5ã¨ãåå¼·ä¼ããECMAScript 2015 & 2016ç¹éãã¨ãããã¼ãã§éå¬ããã¦ãã¾ãããããããçãä¸ããã®ä¸ã§æãã®ã¯ãããã§ã«Babelãããã§è©±ãé²ãããã¦ãããã¨ãããã¨ã§ããBabelãæåã®ã³ããããããã£ã¨1å¹´çµã£ããããã§ããã¾ã ã¾ã 使ãæ¹ã«ã¤ãã¦ããããªãæ¹ãããã¨æãã®ã§ãããã§ã¾ã¨ãã¦ãããã¨æãã¾ããç¹ã«ä½¿ç¨é »åº¦ãé«ããã¡ã¤ã«ç¶æ ãç£è¦ãèªåã§ã³ã³ãã¤ã«ããç°å¢æ§ç¯æ¹æ³ã¨ãªãã¾ãã ã¯ããã«ï¼ES2015ã¨ã¯ï¼ä»å¹´2015å¹´6æã«ãããã¾ã§é·ã ã¨ä»æ§ã®çå®ãé²ãããã¦ããECMAScriptã®6thã¨ãã£ã·ã§ã³ãECMAScript2015ï¼ES2015ï¼
webpack ã¨ã¯ webpack 㯠WebApp ã«å¿ è¦ãªãªã½ã¼ã¹ã®ä¾åé¢ä¿ã解決ããã¢ã»ããï¼é å¸ç©ï¼ãçæãããã«ããã¼ã«ï¼è¦ããã«ã³ã³ãã¤ã©ï¼ã§ããJavaScript ã ãã§ãªããCoffeeScript ã TypeScriptãCSS ç³»ãç»åãã¡ã¤ã«ãªã©ãæ±ããã¨ãã§ãã¾ãã WebApp ã®ãã«ããã¼ã«ã¯ Grunt ã Gulp ãæåã§ãããããã¯åºæ¬çã«ããã«ãæé ãã¿ã¹ã¯ã¨ããå½¢ã§èªãå®ç¾©ããå¿ è¦ããããããã³ãã¨ã³ãéçºã«é¦´æã¿ã®ãªãéçºè ã«ã¨ã£ã¦ã¯æ·å± ãé«ããã®ã§ããï¼å°ãªãã¨ããèªåã¯ããã§ããï¼ã webpack ã使ãã°ãGrunt ã Gulp ãå¿ è¦ããã¾ããï¼è¦ããã¹ããã¨ã¯ã»ã¨ãã©ããã¾ãããï¼å¿ è¦ãªãï¼ç°¡åãªè¨å®ãã¡ã¤ã«ãæ¸ã㦠webpack ã³ãã³ããå®è¡ããã ãã§ãã 以ä¸ã§ã¯åºæ¬çãªä½¿ãæ¹ãè¦ã¦ããã¾ãã â»ãã¡ãã Grunt/G
ãªãªã¼ã¹ãé害æ å ±ãªã©ã®ãµã¼ãã¹ã®ãç¥ãã
ææ°ã®äººæ°ã¨ã³ããªã¼ã®é ä¿¡
å¦çãå®è¡ä¸ã§ã
j次ã®ããã¯ãã¼ã¯
kåã®ããã¯ãã¼ã¯
lãã¨ã§èªã
eã³ã¡ã³ãä¸è¦§ãéã
oãã¼ã¸ãéã
{{#tags}}- {{label}}
{{/tags}}