{"id":1820,"date":"2017-12-15T11:00:27","date_gmt":"2017-12-15T02:00:27","guid":{"rendered":"https:\/\/blog.timecrowd.net\/?p=1820"},"modified":"2017-12-12T14:27:59","modified_gmt":"2017-12-12T05:27:59","slug":"bootstrap4-watcher","status":"publish","type":"post","link":"https:\/\/blog.timecrowd.net\/bootstrap4-watcher\/","title":{"rendered":"Bootstrap4\u306e\u30d3\u30eb\u30c9\u30c4\u30fc\u30eb\u3092\u4f7f\u3063\u3066\u6a2a\u7740\u306bReact\u30a2\u30d7\u30ea\u306a\u3069\u3067watch\u3059\u308b"},"content":{"rendered":"<p>\u30c7\u30b6\u30a4\u30ca\u30fc\u306e\u7530\u4e2d\u3067\u3059\u3002<br \/>\n<a href=\"https:\/\/qiita.com\/futosu\/items\/8996dbb7824300ed6de0\" rel=\"noopener\" target=\"_blank\">Qiita<\/a>\u3068\u540c\u5185\u5bb9\u3067\u3059\u3002<\/p>\n<p>Bootstrap4\u3002\u3068\u3066\u3082\u4fbf\u5229\u306b\u4f7f\u308f\u305b\u3066\u3082\u3089\u3063\u3066\u3044\u307e\u3059\u3002<\/p>\n<p>\u958b\u767a\u4e2d\u306b\u3001Bootstrap4\u306e\u30d5\u30a1\u30a4\u30eb\u3092\u5909\u66f4\u3057\u305f\u3089\u30a2\u30d7\u30ea\u5074\u3067\u3082\u81ea\u52d5\u66f4\u65b0\u3055\u308c\u3066\u307b\u3057\u3044\u3002<br \/>\n\u3068\u3044\u3046\u3053\u3068\u3067\u4f55\u756a\u714e\u3058\u304b\u308f\u304b\u3089\u306a\u3044\u3067\u3059\u304c\u3001Bootstrap\u81ea\u4f53\u306e\u30d3\u30eb\u30c9\u30c4\u30fc\u30eb\u3092\u4f7f\u3046\u5f62\u3067\u3084\u3063\u3066\u307f\u307e\u3057\u305f\u3002<\/p>\n<div id=\"toc_container\" class=\"toc_white no_bullets\"><p class=\"toc_title\">\u76ee\u6b21<\/p><ul class=\"toc_list\"><li><a href=\"#i\"><span class=\"toc_number toc_depth_1\">1<\/span> \u524d\u63d0<\/a><\/li><li><a href=\"#i-2\"><span class=\"toc_number toc_depth_1\">2<\/span> \u30a4\u30f3\u30b9\u30c8\u30fc\u30eb<\/a><\/li><li><a href=\"#watch\"><span class=\"toc_number toc_depth_1\">3<\/span> \u30a2\u30d7\u30ea\u5074\u3067watch\u3067\u304d\u308b\u3088\u3046\u306b\u3059\u308b<\/a><\/li><li><a href=\"#i-3\"><span class=\"toc_number toc_depth_1\">4<\/span> \u8efd\u91cf\u5316\u3059\u308b<\/a><\/li><\/ul><\/div>\n<h2><span id=\"i\">\u524d\u63d0<\/span><\/h2>\n<p>OS X 10.13.2\u3067\u3059\u3002<br \/>\nBootstrap4\u306fbeta2\u3092\u4f7f\u7528\u3057\u307e\u3059\u3002\u203b 2017\/12\/12\u73fe\u5728\u6700\u65b0<br \/>\n\u4ee5\u4e0b\u306e\u3088\u3046\u306a\u30d5\u30a9\u30eb\u30c0\u69cb\u6210\u3067React\u30a2\u30d7\u30ea\u3068\u3057\u307e\u3059\u3002<\/p>\n<pre><code>- project\r\n    - app (\u30a2\u30d7\u30ea)\r\n        - src\r\n            - index.js\r\n        - dist\r\n    - bootstrap (Bootstrap)\r\n    package.json\r\n    webpack.config.js\r\n<\/code>\r\n<\/pre>\n<p>\u4ee5\u4e0b\u306enpm\u30b9\u30af\u30ea\u30d7\u30c8\u3067<code>npm run watch<\/code>\u3067webpack\u7d4c\u7531\u3067\u30a2\u30d7\u30ea\u306e\u5909\u66f4\u3092watch\u3057\u3066\u3044\u307e\u3059\u3002<\/p>\n<pre><code>.\/package.json\r\n\"scripts\": {\r\n  \"watch\": \"webpack-dev-server --config .\/webpack.config.js\",\r\n  ...\r\n}\r\n<\/code>\r\n<\/pre>\n<h2><span id=\"i-2\">\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb<\/span><\/h2>\n<p>Bootstrap\u3092clone\u3057\u3066\u3001\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb<\/p>\n<pre><code>git clone https:\/\/github.com\/twbs\/bootstrap bootstrap\r\ncd .\/bootstrap && npm install && gem install bundler && bundler install\r\n<\/code><\/pre>\n<h2><span id=\"watch\">\u30a2\u30d7\u30ea\u5074\u3067watch\u3067\u304d\u308b\u3088\u3046\u306b\u3059\u308b<\/span><\/h2>\n<p>\u30a2\u30d7\u30ea\u306ewatch\u3068Bootstrap\u306ewatch\u3092\u4e26\u5217\u5b9f\u884c\uff06\u76e3\u8996\u3067\u304d\u308b\u3088\u3046\u306b\u3059\u308b\u305f\u3081\u3001npm-run-all\u3092\u5165\u308c\u307e\u3059\u3002<\/p>\n<pre><code>npm install --save npm-run-all\r\n<\/code><\/pre>\n<p>package.json\u3092\u5909\u66f4\u3057\u307e\u3059\u3002<\/p>\n<pre>\r\n<code>.\/package.json\r\n\"scripts\": {\r\n  \"watch\": \"npm-run-all -p watch:*\",\r\n  \"watch:app\": \"webpack-dev-server --config .\/webpack.config.dev.js\",\r\n  \"watch:bootstrap\": \"cd .\/bootstrap && npm run watch\",\r\n  ...\r\n}\r\n<\/code>\r\n<\/pre>\n<p>\u3082\u3061\u308d\u3093\u30a2\u30d7\u30ea\u304b\u3089Bootstrap\u3092\u8aad\u307f\u8fbc\u3093\u3067\u3044\u308b\u306f\u305a\u3002<\/p>\n<pre><code>.\/app\/src\/index.js\r\nimport '..\/..\/bootstrap\/dist\/css\/bootstrap.css'\r\n<\/code>\r\n<\/pre>\n<p>\u3053\u308c\u3067<code>npm run watch<\/code>\u3057\u3066<code>.\/bootstrap<\/code>\u4ee5\u4e0b\u3092\u7de8\u96c6\u3059\u308c\u3070\u3001\u81ea\u52d5\u66f4\u65b0\u3055\u308c\u307e\u3059\u3002<\/p>\n<p><strong>\u4ee5\u4e0a\u3067\u3059\u3002<\/strong><\/p>\n<p>\u2026\u3068\u8a00\u3044\u305f\u3044\u3068\u3053\u308d\u3067\u3059\u304c\u3001\u3042\u307e\u308a\u306b\u3082\u82b8\u304c\u306a\u3044\u306e\u3067\u3059\u3053\u3057\u5909\u66f4\u3057\u307e\u3059\u3002<\/p>\n<h2><span id=\"i-3\">\u8efd\u91cf\u5316\u3059\u308b<\/span><\/h2>\n<p>Bootstrap\u306ewatch\u3092\u5229\u7528\u3059\u308b\u3068\u3001\u540c\u6642\u306b\u30c9\u30ad\u30e5\u30e1\u30f3\u30c8\u3092\u751f\u6210\u3057\u305f\u308a\u30df\u30cb\u30d5\u30a1\u30a4\u3057\u3066\u304f\u308c\u305f\u308a\u3057\u307e\u3059\u3002<br \/>\n\u5909\u66f4\u306e\u305f\u3073\u306b\u6bce\u56de\u884c\u308f\u308c\u308b\u306e\u3067\u3001\u6642\u9593\u304c\u304b\u304b\u3063\u3066\u3057\u307e\u3044\u307e\u3059\u3002<br \/>\n\u958b\u767a\u4e2d\u306e\u78ba\u8a8d\u306e\u305f\u3081\u306b\u306f\u5fc5\u8981\u306a\u3044\u306f\u305a\u306a\u306e\u3067\u3001\u6700\u4f4e\u9650\u3057\u304b\u884c\u308f\u306a\u3044\u3088\u3046\u306b\u3057\u307e\u3059\u3002<\/p>\n<p>Bootstrap\u5074\u3067\u3002<\/p>\n<pre>\r\n<code>.\/boostrap\/package.json\r\n\"scripts\": {\r\n  \"css-fast-compile\": \"node-sass --output-style expanded --precision 6 scss\/bootstrap.scss dist\/css\/bootstrap.css\",\r\n  \"css-fast-prefix\": \"postcss --config build\/postcss.config.js --replace dist\/css\/bootstrap.css\",\r\n  \"watch-fast\": \"nodemon --ignore js\/ --ignore dist\/ -e scss -x \\\"npm run css-fast-compile && npm run css-fast-prefix\\\"\"\r\n}\r\n<\/code>\r\n<\/pre>\n<p>\u30a2\u30d7\u30ea\u5074\u3067\u3002<\/p>\n<pre>\r\n<code>.\/package.json\r\n\"scripts\": {\r\n  \"watch\": \"npm-run-all -p watch:*\",\r\n  \"watch:app\": \"webpack-dev-server --config .\/webpack.config.dev.js\",\r\n  \"watch:bootstrap\": \"cd .\/bootstrap && npm run watch-fast\",\r\n  ...\r\n}\r\n<\/code>\r\n<\/pre>\n<p><strong>\u4ee5\u4e0a\u3067\u3059\u3002<\/strong><\/p>\n","protected":false},"excerpt":{"rendered":"\u30c7\u30b6\u30a4\u30ca\u30fc\u306e\u7530\u4e2d\u3067\u3059\u3002 Qiita\u3068\u540c\u5185\u5bb9\u3067\u3059\u3002 Bootstrap4\u3002\u3068\u3066\u3082\u4fbf\u5229\u306b\u4f7f\u308f\u305b\u3066\u3082\u3089\u3063\u3066\u3044\u307e\u3059\u3002 \u958b\u767a\u4e2d\u306b\u3001Bootstrap4&#8230;","protected":false},"author":6,"featured_media":1825,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"cybocfi_hide_featured_image":""},"categories":[6,5],"tags":[12,13],"_links":{"self":[{"href":"https:\/\/blog.timecrowd.net\/wp-json\/wp\/v2\/posts\/1820"}],"collection":[{"href":"https:\/\/blog.timecrowd.net\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/blog.timecrowd.net\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/blog.timecrowd.net\/wp-json\/wp\/v2\/users\/6"}],"replies":[{"embeddable":true,"href":"https:\/\/blog.timecrowd.net\/wp-json\/wp\/v2\/comments?post=1820"}],"version-history":[{"count":8,"href":"https:\/\/blog.timecrowd.net\/wp-json\/wp\/v2\/posts\/1820\/revisions"}],"predecessor-version":[{"id":1829,"href":"https:\/\/blog.timecrowd.net\/wp-json\/wp\/v2\/posts\/1820\/revisions\/1829"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/blog.timecrowd.net\/wp-json\/wp\/v2\/media\/1825"}],"wp:attachment":[{"href":"https:\/\/blog.timecrowd.net\/wp-json\/wp\/v2\/media?parent=1820"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/blog.timecrowd.net\/wp-json\/wp\/v2\/categories?post=1820"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/blog.timecrowd.net\/wp-json\/wp\/v2\/tags?post=1820"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}