{"id":8078,"date":"2019-12-08T10:12:05","date_gmt":"2019-12-08T01:12:05","guid":{"rendered":"http:\/\/www.code-magagine.com\/?p=8078"},"modified":"2023-05-27T20:59:31","modified_gmt":"2023-05-27T11:59:31","slug":"%e3%80%90ruby-on-rails%e3%80%91yarn%e3%81%a8webpacker%e3%81%ab%e3%82%88%e3%82%8b%e3%82%af%e3%83%ad%e3%82%b9%e3%83%96%e3%83%a9%e3%82%a6%e3%82%b6%e5%af%be%e5%bf%9c","status":"publish","type":"post","link":"http:\/\/www.code-magagine.com\/?p=8078","title":{"rendered":"\u3010Ruby on Rails\u3011Yarn\u3067\u306eJavaScript\u30d1\u30c3\u30b1\u30fc\u30b8\u7ba1\u7406"},"content":{"rendered":"<h2>Yarn\u3068\u306f\uff1f<\/h2>\n<p>Facebook\u306b\u3088\u308a\u958b\u767a\u3055\u308c\u305fJavaScript\u306e\u30d1\u30c3\u30b1\u30fc\u30b8\u30de\u30cd\u30fc\u30b8\u30e3\u30fc\u3067\u3059\u3002<\/p>\n<h3>\u9ad8\u901f\u52d5\u4f5c<\/h3>\n<p>Npm\u304cJavaScript\u306e\u30d1\u30c3\u30b1\u30fc\u30b8\u30de\u30cd\u30fc\u30b8\u30e3\u30fc\u3068\u3057\u3066\u6709\u540d\u3067\u3059\u304cYarn\u306fNpm\u3088\u308a\u3082\u9ad8\u901f\u306b\u52d5\u4f5c\u3057\u307e\u3059\u3002<\/p>\n<p>\u305f\u3060\u3001\u6700\u8fd1\u306fnpm\u306e\u65b9\u3082\u30d1\u30d5\u30a9\u30fc\u30de\u30f3\u30b9\u6539\u5584\u3092\u30d0\u30fc\u30b8\u30e7\u30f3\u30a2\u30c3\u30d7\u306b\u3088\u308a\u8a66\u307f\u3066\u304d\u305f\u3088\u3046\u3067yarn\u3068\u307b\u307c\u540c\u901f\u304c\u51fa\u308b\u3088\u3046\u306b\u306a\u3063\u3066\u3044\u307e\u3059\u3002\u306a\u306e\u3067\u73fe\u72b6\u306f\u3069\u3061\u3089\u3092\u9078\u3093\u3067\u3082\u826f\u3044\u72b6\u6cc1\u3067\u306f\u3042\u308b\u304b\u3068\u601d\u3044\u307e\u3059\u3002\uff08yarn\u304c\u4f7f\u308f\u308c\u3066\u3044\u308b\u73fe\u5834\u304c\u591a\u3044\u5370\u8c61\u3067\u3059\u3002\uff09<\/p>\n<h3>\u30bb\u30ad\u30e5\u30ea\u30c6\u30a3\u306b\u5f37\u3044<\/h3>\n<p>\u30c1\u30a7\u30c3\u30af\u30b5\u30e0\u306b\u3066\u30e9\u30a4\u30d6\u30e9\u30ea\u306b\u4e88\u671f\u305b\u306c\u5909\u66f4\u304c\u5165\u3063\u3066\u3044\u306a\u3044\u304b\u30c1\u30a7\u30c3\u30af\u3092\u3057\u3066\u304f\u308c\u308b\u306e\u3067\u30bb\u30ad\u30e5\u30ea\u30c6\u30a3\u6027\u3082\u9ad8\u3044\u3067\u3059\u3002<\/p>\n<h3>\u4e00\u8cab\u6027\u304c\u3042\u308b\u3002<\/h3>\n<p>yarn.lock\u3068\u3044\u3046\u30d0\u30fc\u30b8\u30e7\u30f3\u30ed\u30c3\u30af\u6a5f\u69cb\u304c\u3042\u308a\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u306b\u4e00\u8cab\u6027\u3092\u6301\u305f\u305b\u308b\u3053\u3068\u304c\u53ef\u80fd\u3067\u3059\u3002<\/p>\n<h2>Yarn\u3092Rails\u306b\u5c0e\u5165\u3059\u308b\u30e1\u30ea\u30c3\u30c8<\/h2>\n<h3>yarn\u3092\u4f7f\u308f\u306a\u3044\u5834\u5408<\/h3>\n<p>yarn\u3092\u4f7f\u308f\u306a\u3044\u5834\u5408\u306bJavaScript\u30e9\u30a4\u30d6\u30e9\u30ea\u3092Rails\u306b\u5c0e\u5165\u3059\u308b\u5834\u5408\u306f\u3069\u3061\u3089\u304b\u306e\u65b9\u6cd5\u3092\u63a1\u7528\u3059\u308b\u5fc5\u8981\u304c\u3042\u308a\u307e\u3059\u3002<\/p>\n<ol>\n<li>vendor\u30c7\u30a3\u30ec\u30af\u30c8\u30ea\u914d\u4e0b\u306b\u30e9\u30a4\u30d6\u30e9\u30ea\u3092\u30b3\u30d4\u30fc\u3059\u308b\u3002<\/li>\n<li>\u30e9\u30a4\u30d6\u30e9\u30ea\u306eRails\u304b\u3089\u8aad\u307f\u8fbc\u3081\u308b\u3088\u3046\u306b\u30e9\u30c3\u30d7\u3057\u305fgem\u3092\u7528\u610f\u3059\u308b\u3002<\/li>\n<\/ol>\n<p>1\u306e\u65b9\u6cd5\u306e\u5834\u5408\u306f\u81ea\u5206\u3067\u624b\u52d5\u3067\u30d0\u30fc\u30b8\u30e7\u30f3\u3092\u7ba1\u7406\u3059\u308b\u5fc5\u8981\u304c\u3042\u308a\u307e\u3059\u3057\u30012\u306e\u5834\u5408\u306fgem\u304c\u81ea\u52d5\u3067\u30d0\u30fc\u30b8\u30e7\u30f3\u7ba1\u7406\u3057\u3066\u304f\u308c\u307e\u3059\u304c\u30e9\u30a4\u30d6\u30e9\u30ea\u306e\u30d0\u30fc\u30b8\u30e7\u30f3\u30a2\u30c3\u30d7\u306fgem\u306e\u5bfe\u5fdc\u3092\u5f85\u3064\u5fc5\u8981\u304c\u3042\u308a\u6700\u65b0\u7248\u306f\u5229\u7528\u3067\u304d\u306a\u3044\u72b6\u6cc1\u306b\u306a\u3063\u3066\u3057\u307e\u3044\u307e\u3059\u3002<\/p>\n<h3>yarn\u3092\u4f7f\u3046\u5834\u5408<\/h3>\n<p>\u5e38\u306b\u6700\u65b0\u306eJavaScript\u30e9\u30a4\u30d6\u30e9\u30ea\u3092\u63d0\u4f9b\u3057\u3066\u304f\u308c\u3066\u304b\u3064\u81ea\u52d5\u3067\u30d0\u30fc\u30b8\u30e7\u30f3\u7ba1\u7406\u3082\u884c\u3063\u3066\u304f\u308c\u307e\u3059\u3002<\/p>\n<h2>Yarn\u3067\u306e\u30d1\u30c3\u30b1\u30fc\u30b8\u306e\u64cd\u4f5c<\/h2>\n<h3>Yarn\u3067\u30d1\u30c3\u30b1\u30fc\u30b8\u3092\u8ffd\u52a0\u3059\u308b\u306b\u306f\uff1f<\/h3>\n<pre class=\"lang:default decode:true\">yarn add \u30d1\u30c3\u30b1\u30fc\u30b8\u540d<\/pre>\n<p>yarn\u306eadd\u30b3\u30de\u30f3\u30c9\u306f\u4e0b\u8a182\u3064\u306e\u52d5\u4f5c\u3092\u884c\u3063\u3066\u304f\u308c\u307e\u3059\u3002<\/p>\n<ul>\n<li>\u6307\u5b9a\u3055\u308c\u305f\u30d1\u30c3\u30b1\u30fc\u30b8\u3092package.json\u306b\u8ffd\u52a0\u3059\u308b\u3002<\/li>\n<li>\u6307\u5b9a\u3055\u308c\u305f\u30d1\u30c3\u30b1\u30fc\u30b8\u3092\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3059\u308b\u3002<\/li>\n<\/ul>\n<p>\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3057\u305f\u30d1\u30c3\u30b1\u30fc\u30b8\u306fnode_modules\u30c7\u30a3\u30ec\u30af\u30c8\u30ea\u306b\u914d\u7f6e\u3055\u308c\u308b\u3053\u3068\u306b\u306a\u308a\u307e\u3059\u3002<\/p>\n<p>yarn add\u3059\u308b\u3068yarn.lock\u30d5\u30a1\u30a4\u30eb\u3082\u751f\u6210\u3055\u308c\u3066\u5b9f\u969b\u306b\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3055\u308c\u305f\u30d0\u30fc\u30b8\u30e7\u30f3\u304c\u5370\u5b57\u3055\u308c\u307e\u3059\u3002\uff08\u3053\u308c\u3082\u5171\u6709\u3059\u308b\u3053\u3068\u3067\u4ed6\u306e\u958b\u767a\u8005\u3068\u5168\u304f\u540c\u3058\u74b0\u5883\u3092\u69cb\u7bc9\u3059\u308b\u3053\u3068\u304c\u3067\u304d\u308b\u306e\u3067\u30bd\u30fc\u30b9\u7ba1\u7406\u306a\u3069\u3067\u5171\u6709\u3059\u308b\u3088\u3046\u306b\u3057\u307e\u3059\u3002\uff09<\/p>\n<p>\u306a\u304a\u3001\u307b\u3068\u3093\u3069\u306e\u30e9\u30a4\u30d6\u30e9\u30ea\u304cnpm\u30ec\u30b8\u30b9\u30c8\u30ea\u304b\u3089\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3059\u308b\u3053\u3068\u306b\u306a\u308a\u307e\u3059\u3002\uff08yarn\u3067\u3082npm\u3067\u3082\u3069\u3061\u3089\u3067\u3082\u53d6\u5f97\u30ec\u30dd\u30b8\u30c8\u30ea\u306f\u540c\u3058\u3067\u3059\u3002\uff09<\/p>\n<h3>Yarn\u3067\u30d1\u30c3\u30b1\u30fc\u30b8\u3092\u524a\u9664\u3059\u308b\u306b\u306f\uff1f<\/h3>\n<pre class=\"lang:default decode:true  \">yarn remove \u30d1\u30c3\u30b1\u30fc\u30b8\u540d<\/pre>\n","protected":false},"excerpt":{"rendered":"Yarn\u3068\u306f\uff1f Facebook\u306b\u3088\u308a\u958b\u767a\u3055\u308c\u305fJavaScript\u306e\u30d1\u30c3\u30b1\u30fc\u30b8\u30de\u30cd\u30fc\u30b8\u30e3\u30fc\u3067\u3059\u3002 \u9ad8\u901f\u52d5\u4f5c Npm\u304cJavaScript\u306e\u30d1\u30c3\u30b1\u30fc\u30b8\u30de\u30cd\u30fc\u30b8\u30e3\u30fc\u3068\u3057\u3066\u6709\u540d\u3067\u3059\u304cYarn\u306fNpm\u3088\u308a\u3082\u9ad8\u901f\u306b\u52d5\u4f5c\u3057\u307e\u3059\u3002  [&hellip;]","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":[],"categories":[16,36],"tags":[],"_links":{"self":[{"href":"http:\/\/www.code-magagine.com\/index.php?rest_route=\/wp\/v2\/posts\/8078"}],"collection":[{"href":"http:\/\/www.code-magagine.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/www.code-magagine.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/www.code-magagine.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"http:\/\/www.code-magagine.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=8078"}],"version-history":[{"count":11,"href":"http:\/\/www.code-magagine.com\/index.php?rest_route=\/wp\/v2\/posts\/8078\/revisions"}],"predecessor-version":[{"id":20294,"href":"http:\/\/www.code-magagine.com\/index.php?rest_route=\/wp\/v2\/posts\/8078\/revisions\/20294"}],"wp:attachment":[{"href":"http:\/\/www.code-magagine.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=8078"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/www.code-magagine.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=8078"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/www.code-magagine.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=8078"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}