{"id":1978,"date":"2017-12-20T00:00:38","date_gmt":"2017-12-19T15:00:38","guid":{"rendered":"https:\/\/blog.ymyzk.com\/?p=1978"},"modified":"2017-12-19T22:13:32","modified_gmt":"2017-12-19T13:13:32","slug":"how-packages-are-installed","status":"publish","type":"post","link":"https:\/\/blog.ymyzk.com\/2017\/12\/how-packages-are-installed\/","title":{"rendered":"\u30d1\u30c3\u30b1\u30fc\u30b8\u30de\u30cd\u30fc\u30b8\u30e3\u304c\u30d1\u30c3\u30b1\u30fc\u30b8\u3092\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3059\u308b\u4ed5\u7d44\u307f"},"content":{"rendered":"
\u3053\u306e\u8a18\u4e8b\u306f CAMPHOR- Advent Calendar 2017<\/a> \u306e20\u65e5\u76ee\u306e\u8a18\u4e8b\u3067\u3059\uff0e<\/p>\n Python \u3067\u306f pip\uff0cRuby \u3067\u306f Bundler\uff0cJavaScript (Node.js) \u3067\u306f npm \u3068\u69d8\u3005\u306a\u30d1\u30c3\u30b1\u30fc\u30b8\u30de\u30cd\u30fc\u30b8\u30e3\u304c\u5b58\u5728\u3057\u307e\u3059\uff0e\u3053\u308c\u3089\u3092\u4f7f\u3046\u3068\uff0c\u30d1\u30c3\u30b1\u30fc\u30b8\u3092\u3044\u3044\u611f\u3058\u306b\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3057\u3066\u4f7f\u3048\u308b\u3088\u3046\u306b\u3057\u3066\u304f\u308c\u307e\u3059\u304c\uff0c\u3069\u306e\u3088\u3046\u306b\u3057\u3066\u30d1\u30c3\u30b1\u30fc\u30b8\u304c\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3055\u308c\u3066\u3044\u308b\u306e\u304b\u3042\u307e\u308a\u3088\u304f\u628a\u63e1\u3057\u3066\u3044\u306a\u3044\u4eba\u3082\u3044\u308b\u3068\u601d\u3044\u307e\u3059\uff0e\u307e\u305f\uff0cRuby \u3067\u306f \u3053\u306e\u8a18\u4e8b\u3067\u306f\uff0c\u30d1\u30c3\u30b1\u30fc\u30b8\u30de\u30cd\u30fc\u30b8\u30e3\u304c\u3069\u306e\u3088\u3046\u306b\u30d1\u30c3\u30b1\u30fc\u30b8\u3092\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3057\u3066\u3044\u308b\u306e\u304b\u3092\u7d39\u4ecb\u3057\u307e\u3059\uff0e\u307e\u305a\uff0c\u30d1\u30c3\u30b1\u30fc\u30b8\u30de\u30cd\u30fc\u30b8\u30e3\u304c\u5b58\u5728\u3057\u306a\u3044\u5834\u5408\u3092\u4eee\u5b9a\u3057\u3066\u307f\u3066\uff0c\u305d\u3053\u304b\u3089\u69d8\u3005\u306a\u6a5f\u80fd\u3092\u8ffd\u52a0\u3057\u3066\u3044\u304f\u3053\u3068\u3067\u30d1\u30c3\u30b1\u30fc\u30b8\u30de\u30cd\u30fc\u30b8\u30e3\u304c\u4f55\u3092\u3057\u3066\u3044\u308b\u304b\u3092\u9806\u306b\u898b\u3066\u3044\u304d\u307e\u3059\uff0e<\/p>\n <\/p>\n \u3053\u306e\u8a18\u4e8b\u3067\u306f\u4e3b\u306b JavaScript \u3084 Python\uff0cRuby \u3068\u3044\u3063\u305f\u30b9\u30af\u30ea\u30d7\u30c8\u8a00\u8a9e\u306b\u304a\u3051\u308b\u30d1\u30c3\u30b1\u30fc\u30b8\u7ba1\u7406\u306b\u3064\u3044\u3066\u7d39\u4ecb\u3057\u307e\u3059\uff0e\u30d7\u30ed\u30b0\u30e9\u30df\u30f3\u30b0\u8a00\u8a9e\u306b\u3088\u3063\u3066\u8272\u3005\u5dee\u7570\u304c\u3042\u308b\u305f\u3081\uff0c\u3053\u306e\u8a18\u4e8b\u306e\u5185\u5bb9\u304c\u3059\u3079\u3066\u306e\u30d7\u30ed\u30b0\u30e9\u30df\u30f3\u30b0\u8a00\u8a9e\u306b\u5f53\u3066\u306f\u307e\u3089\u306a\u3044\u3053\u3068\u306b\u6ce8\u610f\u3057\u3066\u4e0b\u3055\u3044\uff0e<\/p>\n \u30d1\u30c3\u30b1\u30fc\u30b8\u3084\u30e9\u30a4\u30d6\u30e9\u30ea\uff0c\u30e2\u30b8\u30e5\u30fc\u30eb\u3068\u3044\u3063\u305f\u8a00\u8449\u306f\u57fa\u672c\u7684\u306b\u306f\u4f3c\u3066\u3044\u308b\u3082\u306e\u3067\u3059\uff0e\u305f\u3060\u3057\uff0c\u30d7\u30ed\u30b0\u30e9\u30df\u30f3\u30b0\u8a00\u8a9e\u6bce\u306b\u3088\u3063\u3066\u69d8\u3005\u306a\u5b9a\u7fa9\u304c\u306a\u3055\u308c\u3066\u3044\u308b\u305f\u3081\uff0c\u4e00\u822c\u7684\u306a\u8aac\u660e\u306f\u96e3\u3057\u3044\u3067\u3059\uff0e\u3053\u3053\u3067\u306f\u4ee5\u4e0b\u306e\u3088\u3046\u306b\u5b9a\u7fa9\u3057\u3066\u307f\u307e\u3059\uff0e<\/p>\n \u69d8\u3005\u306a\u4ed6\u306e\u30d7\u30ed\u30b0\u30e9\u30e0\u304b\u3089\u5229\u7528\u3067\u304d\u308b\u3088\u3046\u306b\uff0c\u6c4e\u7528\u6027\u306e\u9ad8\u3044\u30d7\u30ed\u30b0\u30e9\u30e0\u3092\u307e\u3068\u3081\u305f\u3082\u306e\u3092\u30e9\u30a4\u30d6\u30e9\u30ea\u3068\u8a00\u3044\u307e\u3059\uff0e\u4f8b\u3048\u3070 Python \u306e requests<\/a> \u306f HTTP \u30af\u30e9\u30a4\u30a2\u30f3\u30c8\u306e\u6a5f\u80fd\u3092\u63d0\u4f9b\u3057\u3066\u304f\u308c\u308b\u30e9\u30a4\u30d6\u30e9\u30ea\u3067\uff0cNode.js \u306e express<\/a> \u306f Web \u30a2\u30d7\u30ea\u30b1\u30fc\u30b7\u30e7\u30f3\u3092\u4f5c\u6210\u3059\u308b\u305f\u3081\u306e\u30e9\u30a4\u30d6\u30e9\u30ea\u3067\u3059\uff0e<\/p>\n \u30d1\u30c3\u30b1\u30fc\u30b8\u3068\u3044\u3046\u306e\u306f\uff0c\u3053\u306e\u30e9\u30a4\u30d6\u30e9\u30ea\u3092\u518d\u914d\u5e03\u3057\u3084\u3059\u3044\u5f62\u306b\u307e\u3068\u3081\u305f\u3082\u306e\u3060\u3068\u8003\u3048\u3089\u308c\u307e\u3059\uff0e\u4e00\u822c\u7684\u306b\u30bd\u30d5\u30c8\u30a6\u30a7\u30a2 (\u30e9\u30a4\u30d6\u30e9\u30ea\u81ea\u4f53\u306e\u30bd\u30fc\u30b9\u30b3\u30fc\u30c9) \u306b\u52a0\u3048\u3066\uff0c\u30e1\u30bf\u30c7\u30fc\u30bf (\u30d1\u30c3\u30b1\u30fc\u30b8\u306e\u540d\u524d\u3084\u30d0\u30fc\u30b8\u30e7\u30f3\u306e\u60c5\u5831)\uff0c\u30c9\u30ad\u30e5\u30e1\u30f3\u30c8\u306a\u3069\u304c\u30d1\u30c3\u30b1\u30fc\u30b8\u3068\u3057\u3066\u307e\u3068\u3081\u3089\u308c\u3066\u3044\u307e\u3059\uff0eRuby \u3067\u306f gem\uff0cRust \u3067\u306f crate \u306e\u3088\u3046\u306b\uff0c\u30d7\u30ed\u30b0\u30e9\u30df\u30f3\u30b0\u8a00\u8a9e\u6bce\u306b\u30d1\u30c3\u30b1\u30fc\u30b8\u3092\u8868\u3059\u72ec\u81ea\u306e\u540d\u524d\u304c\u4ed8\u3044\u3066\u3044\u308b\u3053\u3068\u3082\u3042\u308a\u307e\u3059\uff0e<\/p>\n \u30d1\u30c3\u30b1\u30fc\u30b8\u30de\u30cd\u30fc\u30b8\u30e3\u306e\u4ed5\u7d44\u307f\u3092\u5206\u304b\u308b\u305f\u3081\u306b\uff0c\u30d1\u30c3\u30b1\u30fc\u30b8\u30de\u30cd\u30fc\u30b8\u30e3\u3092\u4f7f\u308f\u305a\u306b\u30d1\u30c3\u30b1\u30fc\u30b8\u3092\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3059\u308b\u65b9\u6cd5\u3092\u8003\u3048\u3066\u307f\u307e\u3057\u3087\u3046\uff0e\u5b9f\u306f\u5358\u7d14\u306a\u30d1\u30c3\u30b1\u30fc\u30b8\u306f\u30d5\u30a1\u30a4\u30eb\u64cd\u4f5c\u3060\u3051\u3067\u7c21\u5358\u306b\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3059\u308b\u3053\u3068\u304c\u51fa\u6765\u307e\u3059\uff0e<\/p>\n \u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3055\u308c\u305f\u30d1\u30c3\u30b1\u30fc\u30b8\u304c\u30d7\u30ed\u30b0\u30e9\u30e0\u4e2d\u304b\u3089\u4f7f\u3048\u308b\u4ed5\u7d44\u307f\u306f\u6b21\u306e\u3088\u3046\u306b\u306a\u3063\u3066\u3044\u307e\u3059\uff0e\u591a\u304f\u306e\u30d7\u30ed\u30b0\u30e9\u30df\u30f3\u30b0\u8a00\u8a9e\u51e6\u7406\u7cfb\u306f\u30e9\u30a4\u30d6\u30e9\u30ea\u3092\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3059\u308b\u305f\u3081\u306e\u30c7\u30a3\u30ec\u30af\u30c8\u30ea\u3092\u6301\u3063\u3066\u304a\u308a\uff0c\u3053\u306e\u30c7\u30a3\u30ec\u30af\u30c8\u30ea\u306b\u30e9\u30a4\u30d6\u30e9\u30ea (\u30bd\u30fc\u30b9\u30b3\u30fc\u30c9) \u306e\u30d5\u30a1\u30a4\u30eb\u3092\u7f6e\u3044\u3066\u304a\u304f\u3068\uff0c\u30d7\u30ed\u30b0\u30e9\u30e0\u4e2d\u304b\u3089\u30e9\u30a4\u30d6\u30e9\u30ea\u3092\u5229\u7528\u3067\u304d\u308b\u3088\u3046\u306b\u306a\u3063\u3066\u3044\u307e\u3059\uff0e<\/p>\n \u3064\u307e\u308a\uff0c\u30d1\u30c3\u30b1\u30fc\u30b8\u30de\u30cd\u30fc\u30b8\u30e3\u306f\u30d1\u30c3\u30b1\u30fc\u30b8\u304b\u3089\u30e9\u30a4\u30d6\u30e9\u30ea\u306e\u30bd\u30fc\u30b9\u30b3\u30fc\u30c9\u3092\u53d6\u308a\u51fa\u3057\uff0c\u6c7a\u3081\u3089\u308c\u305f\u30c7\u30a3\u30ec\u30af\u30c8\u30ea\u306b\u30d5\u30a1\u30a4\u30eb\u3092\u30b3\u30d4\u30fc\u3059\u308b\u3053\u3068\u3067\uff0c\u30d1\u30c3\u30b1\u30fc\u30b8\u3092\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3057\u3066\u3044\u307e\u3059\uff0e(\u3053\u308c\u306f\u6700\u3082\u5358\u7d14\u306a\u5834\u5408\u306a\u306e\u3067\uff0c\u30d5\u30a1\u30a4\u30eb\u3092\u30b3\u30d4\u30fc\u3059\u308b\u524d\u306b\u30b3\u30f3\u30d1\u30a4\u30eb\u3059\u308b\u3088\u3046\u306a\u5834\u5408\u3082\u3042\u308a\u307e\u3059\uff0e)<\/p>\n \u5b9f\u969b\u306b Node.js \u3067\uff0c\u30d1\u30c3\u30b1\u30fc\u30b8\u30de\u30cd\u30fc\u30b8\u30e3\u3092\u4f7f\u308f\u305a\u306b\u30d1\u30c3\u30b1\u30fc\u30b8\u3092\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3059\u308b\u4f8b\u3092\u7d39\u4ecb\u3057\u307e\u3059\uff0e\u67b6\u7a7a\u306e \u3053\u306e\u30d7\u30ed\u30b0\u30e9\u30e0\u3092\u5b9f\u884c\u3059\u308b\u3068\u4ee5\u4e0b\u306e\u3088\u3046\u306b\u306a\u308a\u307e\u3059:<\/p>\n \u307e\u3060\u30d1\u30c3\u30b1\u30fc\u30b8\u3092\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3057\u3066\u3044\u306a\u3044\u306e\u3067\uff0c\u5f53\u7136\u30a8\u30e9\u30fc\u306b\u306a\u308a\u307e\u3059\uff0e\u305d\u308c\u3067\u306f\u5b9f\u969b\u306b\u30d1\u30c3\u30b1\u30fc\u30b8\u3092\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3057\u3066\u307f\u307e\u3057\u3087\u3046\uff0eHello world \u3092\u8868\u793a\u3059\u308b\u95a2\u6570 Node.js \u3067\u306f\uff0c\u30d1\u30c3\u30b1\u30fc\u30b8\u306f \u3053\u308c\u3067 npm \u3084 yarn \u306e\u3088\u3046\u306a\u30d1\u30c3\u30b1\u30fc\u30b8\u30de\u30cd\u30fc\u30b8\u30e3\u3092\u4f7f\u308f\u305a\u306b\u7c21\u5358\u306a\u30d1\u30c3\u30b1\u30fc\u30b8\u3092\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3059\u308b\u3053\u3068\u304c\u51fa\u6765\u307e\u3057\u305f!<\/p>\n \u3057\u304b\u3057\uff0c\u3053\u306e\u3088\u3046\u306a\u65b9\u6cd5\u3067\u306f\u3044\u304f\u3064\u304b\u306e\u554f\u984c\u304c\u3042\u308a\u307e\u3059\uff0e\u307e\u305a\uff0c\u30d1\u30c3\u30b1\u30fc\u30b8\u306e\u30d5\u30a9\u30fc\u30de\u30c3\u30c8\u304c\u5b9a\u307e\u3063\u3066\u3044\u306a\u3044\u305f\u3081\uff0c\u30d1\u30c3\u30b1\u30fc\u30b8\u6bce\u306b\u3069\u306e\u30d5\u30a1\u30a4\u30eb\u3092\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3059\u308c\u3070\u826f\u3044\u304b\u8abf\u3079\u308b\u5fc5\u8981\u304c\u3042\u308a\u307e\u3059\uff0e\u307e\u305f\uff0c\u591a\u304f\u306e\u30d1\u30c3\u30b1\u30fc\u30b8\u3092\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3059\u308b\u5834\u5408\uff0c\u624b\u52d5\u3067\u6b63\u3057\u3044\u5834\u6240\u306b\u30d5\u30a1\u30a4\u30eb\u3092\u30b3\u30d4\u30fc\u3059\u308b\u306e\u306f\u4e0d\u53ef\u80fd\u3067\u3059\uff0e\u5229\u7528\u3059\u308b\u30d1\u30c3\u30b1\u30fc\u30b8\u306e\u6570\u306f\u30d7\u30ed\u30b8\u30a7\u30af\u30c8\u306e\u898f\u6a21\u3084\u8a00\u8a9e\u306b\u3088\u3063\u3066\u3082\u7570\u306a\u308a\u307e\u3059\u304c\uff0cNode.js \u3067\u306f\u305d\u308c\u307b\u3069\u5927\u304d\u3044\u30d7\u30ed\u30b8\u30a7\u30af\u30c8\u3067\u306a\u304f\u3066\u3082\u6570\u5343\u500b\u306e\u30d1\u30c3\u30b1\u30fc\u30b8\u3092\u6271\u3046\u3053\u3068\u304c\u3042\u308a\u307e\u3059\uff0e\u3053\u308c\u3089\u306e\u554f\u984c\u3092\u89e3\u6c7a\u3059\u308b\u65b9\u6cd5\u3092\u6b21\u306b\u898b\u3066\u3044\u304d\u307e\u3059\uff0e<\/p>\n \u81ea\u52d5\u3067\u30d1\u30c3\u30b1\u30fc\u30b8\u3092\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3067\u304d\u308b\u3088\u3046\u306b\u3059\u308b\u306b\u306f\uff0c\u307e\u305a\u30d1\u30c3\u30b1\u30fc\u30b8\u306e\u30d5\u30a9\u30fc\u30de\u30c3\u30c8\u3092\u6c7a\u3081\u308b\u3053\u3068\u304c\u5fc5\u8981\u3067\u3059\uff0e\u4f8b\u3048\u3070\uff0c\u30d1\u30c3\u30b1\u30fc\u30b8\u540d\u3084\u30d0\u30fc\u30b8\u30e7\u30f3\u306e\u3088\u3046\u306a\u30e1\u30bf\u30c7\u30fc\u30bf\u3092\u7279\u5b9a\u306e\u540d\u524d\u306e\u30d5\u30a1\u30a4\u30eb\u306b\u8a18\u8ff0\u3059\u308b\u3053\u3068\u3084\uff0c\u30bd\u30fc\u30b9\u30b3\u30fc\u30c9\u3092\u30e1\u30bf\u30c7\u30fc\u30bf\u3092\u6c7a\u307e\u3063\u305f\u5f62\u5f0f (ZIP \u306a\u3069) \u3067\u5727\u7e2e\u3059\u308b\u3068\u3044\u3063\u305f\u3053\u3068\u304c\u3042\u308a\u307e\u3059\uff0e<\/p>\n \u30e1\u30bf\u30c7\u30fc\u30bf\u3092\u542b\u3080\u30d5\u30a1\u30a4\u30eb\u306f Python \u3067\u306f \u30e1\u30bf\u30c7\u30fc\u30bf\u306b\u306f\u30d1\u30c3\u30b1\u30fc\u30b8\u540d\u3084\u30d0\u30fc\u30b8\u30e7\u30f3\uff0c\u8aac\u660e\uff0c\u4f5c\u8005\uff0c\u30e9\u30a4\u30bb\u30f3\u30b9\u306a\u3069\u306e\u60c5\u5831\u304c\u542b\u307e\u308c\u3066\u3044\u308b\u306e\u304c\u5206\u304b\u308b\u3068\u601d\u3044\u307e\u3059\uff0e<\/p>\n \u3053\u306e\u3088\u3046\u306a\u30d1\u30c3\u30b1\u30fc\u30b8\u306e\u30d5\u30a9\u30fc\u30de\u30c3\u30c8\u304c\u6c7a\u307e\u308c\u3070\uff0c\u4f5c\u6210\u3057\u305f\u30d1\u30c3\u30b1\u30fc\u30b8\u3092\u30a4\u30f3\u30bf\u30fc\u30cd\u30c3\u30c8\u4e0a\u306b\u516c\u958b\u3057\u3066\u304a\u3044\u3066\uff0c\u305d\u308c\u3092\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3059\u308b\u3088\u3046\u306a\u30d1\u30c3\u30b1\u30fc\u30b8\u30de\u30cd\u30fc\u30b8\u30e3\u3092\u4f5c\u308b\u3053\u3068\u304c\u51fa\u6765\u308b\u3068\u601d\u3044\u307e\u3059\uff0e\u4f7f\u7528\u30a4\u30e1\u30fc\u30b8\u306f\u4ee5\u4e0b\u306e\u3088\u3046\u306a\u611f\u3058\u3067\u3059<\/p>\n \u624b\u52d5\u3067\u30d5\u30a1\u30a4\u30eb\u3092\u30b3\u30d4\u30fc\u3057\u3066\u3044\u305f\u4f8b\u3068\u6bd4\u3079\u308b\u3068\u5927\u304d\u304f\u9032\u6b69\u3057\u3066\u3044\u307e\u3059\u304c\uff0c\u3044\u304f\u3064\u304b\u6c17\u306b\u306a\u308b\u70b9\u304c\u6b8b\u308a\u307e\u3059:<\/p>\n \u6b21\u306b\u3053\u308c\u3089\u306e\u554f\u984c\u3092\u89e3\u6c7a\u3059\u308b\u65b9\u6cd5\u3092\u7d39\u4ecb\u3057\u307e\u3059\uff0e<\/p>\n \u30d1\u30c3\u30b1\u30fc\u30b8\u30a4\u30f3\u30c7\u30c3\u30af\u30b9\u3084\u30d1\u30c3\u30b1\u30fc\u30b8\u30ea\u30dd\u30b8\u30c8\u30ea\u306f\uff0c\u69d8\u3005\u306a\u4eba\u304c\u30d1\u30c3\u30b1\u30fc\u30b8\u3092\u30a2\u30c3\u30d7\u30ed\u30fc\u30c9\u3057\u3066\uff0c\u4ed6\u306e\u30e6\u30fc\u30b6\u30fc\u304c\u30d1\u30c3\u30b1\u30fc\u30b8\u3092\u5229\u7528\u3067\u304d\u308b\u3088\u3046\u306b\u3059\u308b\u305f\u3081\u306e\u4ed5\u7d44\u307f\u3067\u3059\uff0e\u5177\u4f53\u7684\u306b\u306f Python \u3067\u306f PyPI<\/a>\uff0cRuby \u3067\u306f RubyGems<\/a>\uff0cNode.js \u3067\u306f npm<\/a> \u3068\u547c\u3070\u308c\u308b\u3082\u306e\u304c\u5b58\u5728\u3057\u307e\u3059\uff0e\u3053\u308c\u3092\u5229\u7528\u3059\u308b\u3053\u3068\u306b\u3088\u3063\u3066\u524d\u7bc0\u3067\u6319\u3052\u305f\u3088\u3046\u306a\u554f\u984c\u3092\u6982\u306d\u89e3\u6c7a\u3067\u304d\u307e\u3059\uff0e<\/p>\n \u4f8b\u3048\u3070\uff0c\u591a\u304f\u306e\u30d1\u30c3\u30b1\u30fc\u30b8\u30de\u30cd\u30fc\u30b8\u30e3\u3067\u306f\u30d1\u30c3\u30b1\u30fc\u30b8\u540d\u306e\u307f\u3092\u6307\u5b9a\u3057\u3066\u30d1\u30c3\u30b1\u30fc\u30b8\u3092\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3057\u3088\u3046\u3068\u3059\u308b\u3068\uff0c\u30c7\u30d5\u30a9\u30eb\u30c8\u306e\u30d1\u30c3\u30b1\u30fc\u30b8\u30a4\u30f3\u30c7\u30c3\u30af\u30b9\u304b\u3089\u30d1\u30c3\u30b1\u30fc\u30b8\u3092\u691c\u7d22\u3057\u3066\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3057\u3066\u304f\u308c\u307e\u3059\uff0e\u4f8b\u3048\u3070 \u3053\u3053\u307e\u3067\u8aac\u660e\u3057\u305f\u5185\u5bb9\u3067\u30a4\u30f3\u30bf\u30fc\u30cd\u30c3\u30c8\u304b\u3089\u30d1\u30c3\u30b1\u30fc\u30b8\u3092\u30c0\u30a6\u30f3\u30ed\u30fc\u30c9\u3057\u3066\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3059\u308b\u57fa\u672c\u7684\u306a\u90e8\u5206\u304c\u5b9f\u73fe\u3055\u308c\u3066\u3044\u308b\u65b9\u6cd5\u304c\u5206\u304b\u3063\u305f\u3068\u601d\u3044\u307e\u3059\uff0e\u6b21\u306f\u5c11\u3057\u8907\u96d1\u306a\u4f9d\u5b58\u95a2\u4fc2\u306b\u3064\u3044\u3066\u7d39\u4ecb\u3057\u307e\u3059\uff0e<\/p>\n \u3042\u308b\u30d1\u30c3\u30b1\u30fc\u30b8\u304c\u4ed6\u306e\u30d1\u30c3\u30b1\u30fc\u30b8\u3092\u5185\u90e8\u3067\u5229\u7528\u3057\u3066\u3044\u308b\u3053\u3068\u306f\u3088\u304f\u3042\u308a\u307e\u3059\uff0e\u4f8b\u3048\u3070\uff0cRuby on Rails (rails) \u306e gem (\u30d1\u30c3\u30b1\u30fc\u30b8) \u306f activerecord \u3084 actionsupport \u3068\u3044\u3063\u305f\uff0c\u4ed6\u306e gem \u3092\u5185\u90e8\u3067\u5229\u7528\u3057\u3066\u3044\u307e\u3059\uff0e\u3053\u306e\u305f\u3081 rails \u3092\u4f7f\u3046\u305f\u3081\u306b\u306f\uff0crails \u304c\u4f9d\u5b58\u3057\u3066\u3044\u308b (\u5fc5\u8981\u3068\u3057\u3066\u3044\u308b) \u3053\u308c\u3089\u306e\u30d1\u30c3\u30b1\u30fc\u30b8\u3092\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3059\u308b\u5fc5\u8981\u304c\u3042\u308a\u307e\u3059\uff0e<\/p>\n \u3057\u304b\u3057\uff0c\u3042\u308b\u30d1\u30c3\u30b1\u30fc\u30b8\u3092\u4f7f\u3046\u305f\u3081\u306b\u305d\u308c\u304c\u4f9d\u5b58\u3057\u3066\u3044\u308b\u30d1\u30c3\u30b1\u30fc\u30b8\u3092\u628a\u63e1\u3057\u3066\uff0c\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3059\u308b\u306e\u306f\u306a\u304b\u306a\u304b\u5927\u5909\u3067\u3059\uff0e\u4f9d\u5b58\u3057\u3066\u3044\u308b\u30d1\u30c3\u30b1\u30fc\u30b8\u304c\u4ed6\u306e\u30d1\u30c3\u30b1\u30fc\u30b8\u306b\u3055\u3089\u306b\u4f9d\u5b58\u3057\u3066\u3044\u308b\u3053\u3068\u3082\u3042\u308a\u307e\u3059\u3057\uff0c\u4f9d\u5b58\u3057\u3066\u3044\u308b\u30d1\u30c3\u30b1\u30fc\u30b8\u306e\u6570\u304c\u3068\u3066\u3082\u591a\u3044\u30e9\u30a4\u30d6\u30e9\u30ea\u3082\u5b58\u5728\u3057\u307e\u3059\uff0e<\/p>\n \u3053\u306e\u3088\u3046\u306a\u554f\u984c\u3092\u89e3\u6c7a\u3059\u308b\u305f\u3081\uff0c\u30d1\u30c3\u30b1\u30fc\u30b8\u306e\u30e1\u30bf\u30c7\u30fc\u30bf\u306b\u306f\u305d\u306e\u30d1\u30c3\u30b1\u30fc\u30b8\u3092\u5229\u7528\u3059\u308b\u305f\u3081\u306b\u4ed6\u306e\u3069\u306e\u3088\u3046\u306a\u30d1\u30c3\u30b1\u30fc\u30b8\u304c\u5fc5\u8981\u306a\u306e\u304b\u3068\u3044\u3046\u4f9d\u5b58\u95a2\u4fc2\u3092\u8a18\u8ff0\u3067\u304d\u308b\u3088\u3046\u306b\u306a\u3063\u3066\u3044\u307e\u3059\uff0e\u307e\u305f\uff0c\u4f9d\u5b58\u95a2\u4fc2\u3092\u66f8\u304f\u969b\u306b\u306f\u30d1\u30c3\u30b1\u30fc\u30b8\u306e\u30d0\u30fc\u30b8\u30e7\u30f3\u3092\u6307\u5b9a\u3067\u304d\u308b\u3088\u3046\u306b\u306a\u3063\u3066\u3044\u308b\u3053\u3068\u304c\u3042\u308a\u307e\u3059\uff0e\u3053\u308c\u306b\u3088\u3063\u3066\uff0c\u4f9d\u5b58\u3057\u3066\u3044\u308b\u30d1\u30c3\u30b1\u30fc\u30b8\u304c\u30a2\u30c3\u30d7\u30c7\u30fc\u30c8\u3055\u308c API (\u4ed5\u69d8) \u304c\u5927\u304d\u304f\u5909\u308f\u308a\uff0c\u30d1\u30c3\u30b1\u30fc\u30b8\u304c\u4f7f\u3048\u306a\u304f\u306a\u3063\u3066\u3057\u307e\u3046\u3088\u3046\u306a\u3053\u3068\u3092\u9632\u304e\u3084\u3059\u304f\u306a\u308a\u307e\u3059\uff0e<\/p>\n \u30d0\u30fc\u30b8\u30e7\u30f3\u306e\u6307\u5b9a\u65b9\u6cd5\u306f\u30d1\u30c3\u30b1\u30fc\u30b8\u30de\u30cd\u30fc\u30b8\u30e3\u306b\u3088\u3063\u3066\u3044\u308d\u3044\u308d\u3042\u308a\u307e\u3059\u304c\uff0c\u30d0\u30fc\u30b8\u30e7\u30f3\u3092\u5b8c\u5168\u306b\u56fa\u5b9a\u3059\u308b\u65b9\u6cd5\u3084\uff0c\u3042\u308b\u30d0\u30fc\u30b8\u30e7\u30f3\u3088\u308a\u65b0\u3057\u3044\u3082\u306e\u53e4\u3044\u3082\u306e\u3092\u6307\u5b9a\u3059\u308b\u65b9\u6cd5\uff0c\u30bb\u30de\u30f3\u30c6\u30a3\u30c3\u30af\u30d0\u30fc\u30b8\u30e7\u30cb\u30f3\u30b0\u306b\u57fa\u3065\u304d\u30e1\u30b8\u30e3\u30fc\u30d0\u30fc\u30b8\u30e7\u30f3\u3084\u30de\u30a4\u30ca\u30fc\u30d0\u30fc\u30b8\u30e7\u30f3\u3092\u6307\u5b9a\u3059\u308b\u65b9\u6cd5\u306a\u3069\u304c\u3042\u308a\u307e\u3059\uff0e\u4f8b:<\/p>\n \u3053\u306e\u3088\u3046\u306a\u4f9d\u5b58\u95a2\u4fc2\u306e\u30e1\u30bf\u30c7\u30fc\u30bf\u3092\u5229\u7528\u3059\u308b\u3068\uff0c\u3042\u308b\u30d1\u30c3\u30b1\u30fc\u30b8\u3092\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3059\u308b\u3068\u304d\u306b\u5fc5\u8981\u306a\u3059\u3079\u3066\u306e\u30d1\u30c3\u30b1\u30fc\u30b8\u3092\u30ea\u30b9\u30c8\u30a2\u30c3\u30d7\u3059\u308b\u3053\u3068\u304c\u3067\u304d\uff0c\u307e\u305f\u305d\u308c\u305e\u308c\u306e\u30d1\u30c3\u30b1\u30fc\u30b8\u306e\u3069\u306e\u30d0\u30fc\u30b8\u30e7\u30f3\u3092\u5165\u308c\u308c\u3070\u826f\u3044\u304b\u5236\u7d04\u3092\u89e3\u3044\u3066\u5fc5\u8981\u306a\u30d0\u30fc\u30b8\u30e7\u30f3\u306e\u30d1\u30c3\u30b1\u30fc\u30b8\u3092\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3059\u308b\u3053\u3068\u304c\u51fa\u6765\u307e\u3059\uff0e<\/p>\n \u4f9d\u5b58\u95a2\u4fc2\u306e\u89e3\u6c7a\u306f\u57fa\u672c\u7684\u306b\u306f\u4e0a\u306e\u4ed5\u7d44\u307f\u3067\u52d5\u3044\u3066\u3044\u308b\u306e\u3067\u3059\u304c\uff0c\u307e\u3060\u5c11\u3057\u554f\u984c\u304c\u6b8b\u3063\u3066\u3044\u307e\u3059\uff0e\u305d\u308c\u306f\uff0c\u30d1\u30c3\u30b1\u30fc\u30b8\u306e\u4f9d\u5b58\u95a2\u4fc2\u3092\u89e3\u6c7a\u3057\u305f\u7d50\u679c\u304c\u6642\u9593\u306b\u3088\u3063\u3066\u5909\u308f\u3063\u3066\u3057\u307e\u3046\u3068\u3044\u3046\u3053\u3068\u3067\u3059\uff0e<\/p>\n \u4f8b\u3048\u3070\uff0c\u30d1\u30c3\u30b1\u30fc\u30b8B\u3068\u30d1\u30c3\u30b1\u30fc\u30b8C\u306b\u4f9d\u5b58\u3059\u308b\u30d1\u30c3\u30b1\u30fc\u30b8A\u304c\u5b58\u5728\u3059\u308b\u3068\u3057\u307e\u3059\uff0e\u958b\u767a\u3059\u308b\u3068\u304d\u306b\u30d1\u30c3\u30b1\u30fc\u30b8A\u3092\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3059\u308b\u3068\uff0c\u4f9d\u5b58\u95a2\u4fc2\u304c\u89e3\u6c7a\u3055\u308c\u3066\u30d1\u30c3\u30b1\u30fc\u30b8B v1.0 \u3068\u30d1\u30c3\u30b1\u30fc\u30b8C v2.0 \u304c\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3055\u308c\u307e\u3057\u305f\uff0e\u6570\u65e5\u5f8c\uff0c\u672c\u756a\u306e\u30b5\u30fc\u30d0\u30fc\u3067\u540c\u3058\u30d1\u30c3\u30b1\u30fc\u30b8A\u3092\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3059\u308b\u3068\uff0c\u30d1\u30c3\u30b1\u30fc\u30b8B \u304c\u30a2\u30c3\u30d7\u30c7\u30fc\u30c8\u3055\u308c\u3066\u304a\u308a\uff0c\u30d1\u30c3\u30b1\u30fc\u30b8B v1.1 \u3068\u30d1\u30c3\u30b1\u30fc\u30b8C v2.0 \u304c\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3055\u308c\u307e\u3057\u305f<\/p>\n \u3053\u306e\u3088\u3046\u306b\uff0c\u4f9d\u5b58\u95a2\u4fc2\u306e\u89e3\u6c7a\u7d50\u679c\u304c\u30d1\u30c3\u30b1\u30fc\u30b8\u3092\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3057\u305f\u6642\u9593\u306b\u3088\u3063\u3066\u5909\u308f\u3063\u3066\u3057\u307e\u3046\u3068\uff0c\u958b\u767a\u6642\u306b\u306f\u3046\u307e\u304f\u52d5\u3044\u3066\u3044\u305f\u30b5\u30fc\u30d3\u30b9\u304c\uff0c\u672c\u756a\u74b0\u5883\u3067\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3057\u305f\u3068\u304d\u306b\u306f\u9055\u3046\u30d0\u30fc\u30b8\u30e7\u30f3\u306e\u30d1\u30c3\u30b1\u30fc\u30b8\u304c\u5165\u3063\u3066\u3057\u307e\u3044\uff0c\u52d5\u4f5c\u304c\u304a\u304b\u3057\u304f\u306a\u308b\u3068\u3044\u3063\u305f\u3053\u3068\u304c\u8d77\u3053\u308a\u307e\u3059\uff0e<\/p>\n \u305d\u3053\u3067\u6700\u8fd1\u306e\u30d1\u30c3\u30b1\u30fc\u30b8\u30de\u30cd\u30fc\u30b8\u30e3\u306b\u306f\uff0c\u30e1\u30bf\u30c7\u30fc\u30bf\u306b\u8a18\u8ff0\u3059\u308b\u4f9d\u5b58\u95a2\u4fc2\u3068\u5225\u306b\uff0c\u4f9d\u5b58\u95a2\u4fc2\u3092\u89e3\u6c7a\u3057\u305f\u7d50\u679c\u306e\u30ed\u30c3\u30af\u30d5\u30a1\u30a4\u30eb\u3092\u4f5c\u308b\u3082\u306e\u304c\u5897\u3048\u3066\u3044\u307e\u3059\uff0e\u5177\u4f53\u7684\u306a\u4f8b\u3068\u3057\u3066\u306f\uff0cRuby \u306e Bundler \u3067\u306f \u3053\u306e\u3088\u3046\u306b\u30ed\u30c3\u30af\u30d5\u30a1\u30a4\u30eb\u3092\u5229\u7528\u3059\u308b\u3053\u3068\u3067\uff0c\u69d8\u3005\u306a\u74b0\u5883\u3067\u540c\u3058\u30d0\u30fc\u30b8\u30e7\u30f3\u306e\u30d1\u30c3\u30b1\u30fc\u30b8\u3092\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3059\u308b\u3053\u3068\u304c\u53ef\u80fd\u306b\u306a\u3063\u3066\u3044\u307e\u3059\uff0e\u3053\u306e\u30ed\u30c3\u30af\u30d5\u30a1\u30a4\u30eb\u306f\u30d1\u30c3\u30b1\u30fc\u30b8\u30de\u30cd\u30fc\u30b8\u30e3\u304c\u81ea\u52d5\u7684\u306b\u751f\u6210\u3059\u308b\u306e\u3067\uff0c\u624b\u52d5\u3067\u30ed\u30c3\u30af\u30d5\u30a1\u30a4\u30eb\u3092\u7de8\u96c6\u3057\u3066\u306f\u3044\u3051\u307e\u305b\u3093\uff0e\u307e\u305f\uff0c\u4f9d\u5b58\u95a2\u4fc2\u3092\u89e3\u6c7a\u3057\u305f\u7d50\u679c\u304c\u542b\u307e\u308c\u3066\u3044\u308b\u91cd\u8981\u306a\u30d5\u30a1\u30a4\u30eb\u306a\u306e\u3067\uff0c\u30ed\u30c3\u30af\u30d5\u30a1\u30a4\u30eb\u3082 Git \u7b49\u3067\u30d0\u30fc\u30b8\u30e7\u30f3\u7ba1\u7406\u3059\u3079\u304d\u3067\u3059\uff0e<\/p>\n \u4eca\u56de\u306e\u8a18\u4e8b\u3067\u306f\u30d1\u30c3\u30b1\u30fc\u30b8\u30de\u30cd\u30fc\u30b8\u30e3\u304c\u30d1\u30c3\u30b1\u30fc\u30b8\u3092\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3059\u308b\u4ed5\u7d44\u307f\u306b\u3064\u3044\u3066\u7c21\u5358\u306b\u7d39\u4ecb\u3057\u307e\u3057\u305f\uff0e\u7d39\u4ecb\u3057\u305f\u306e\u306f\u4ee5\u4e0b\u306e\u3088\u3046\u306a\u6a5f\u80fd\u3067\u3059:<\/p>\n \u4eca\u56de\u306e\u8a18\u4e8b\u3067\u306f\u7d39\u4ecb\u3057\u304d\u308c\u307e\u305b\u3093\u3067\u3057\u305f\u304c\uff0c\u5b9f\u969b\u306e\u30d1\u30c3\u30b1\u30fc\u30b8\u30de\u30cd\u30fc\u30b8\u30e3\u3067\u306f\u3082\u3063\u3068\u591a\u304f\u306e\u6a5f\u80fd\u304c\u5b9f\u88c5\u3055\u308c\u3066\u3044\u307e\u3059\uff0e\u4f8b\u3048\u3070\uff0c\u30d1\u30c3\u30b1\u30fc\u30b8\u3092\u4f5c\u6210\u3057\u3066\u30a2\u30c3\u30d7\u30ed\u30fc\u30c9\u3059\u308b\u6a5f\u80fd\u3084\uff0c\u30d1\u30c3\u30b1\u30fc\u30b8\u3092\u30a2\u30f3\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3059\u308b\u6a5f\u80fd\u306a\u3069\u304c\u3042\u308a\u307e\u3059\uff0e<\/p>\n CAMPHOR- Advent Calendar 2017<\/a> \u306e\u660e\u65e5\u306e\u62c5\u5f53\u306f @ryota-ka<\/a> \u3067\u3059\uff0e@ryota-ka \u304c\u5275\u696d\u30e1\u30f3\u30d0\u30fc\u306e\u4e00\u4eba\u3067\u3067\u81ea\u5206\u3082\u30a8\u30f3\u30b8\u30cb\u30a2\u3068\u3057\u3066\u304a\u624b\u4f1d\u3044\u3057\u3066\u3044\u308b\u682a\u5f0f\u4f1a\u793eHERP\u306e\u63a1\u7528\u62c5\u5f53\u8005\u306e\u305f\u3081\u306e SaaS \u306e\u30c6\u30a3\u30b6\u30fc\u30b5\u30a4\u30c8<\/a>\u304c\u6628\u65e5\u516c\u958b\u3055\u308c\u307e\u3057\u305f\ud83c\udf89 HERP \u3067\u306f\u30a8\u30f3\u30b8\u30cb\u30a2\u3084\u30a8\u30f3\u30b8\u30cb\u30a2\u30a4\u30f3\u30bf\u30fc\u30f3\u3092\u7d76\u8cdb\u52df\u96c6\u4e2d\u3067\u3059\u306e\u3067\uff0c\u8208\u5473\u306e\u3042\u308b\u65b9\u306f\u305c\u3072 Wantedly<\/a> \u3092\u3054\u89a7\u4e0b\u3055\u3044\uff0e<\/p>\n","protected":false},"excerpt":{"rendered":" \u3053\u306e\u8a18\u4e8b\u306f CAMPHOR- Advent Calendar 2017 \u306e20\u65e5\u76ee\u306e\u8a18\u4e8b\u3067\u3059\uff0e Python \u3067\u306f pip\uff0cRuby \u3067\u306f Bundler\uff0cJavaScript (Node.js) \u3067\u306f npm \u3068\u69d8\u3005\u306a […]<\/p>\n","protected":false},"author":2,"featured_media":1992,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[26],"tags":[8,45,120,15,94],"_links":{"self":[{"href":"https:\/\/blog.ymyzk.com\/wp-json\/wp\/v2\/posts\/1978"}],"collection":[{"href":"https:\/\/blog.ymyzk.com\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/blog.ymyzk.com\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/blog.ymyzk.com\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/blog.ymyzk.com\/wp-json\/wp\/v2\/comments?post=1978"}],"version-history":[{"count":19,"href":"https:\/\/blog.ymyzk.com\/wp-json\/wp\/v2\/posts\/1978\/revisions"}],"predecessor-version":[{"id":2002,"href":"https:\/\/blog.ymyzk.com\/wp-json\/wp\/v2\/posts\/1978\/revisions\/2002"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/blog.ymyzk.com\/wp-json\/wp\/v2\/media\/1992"}],"wp:attachment":[{"href":"https:\/\/blog.ymyzk.com\/wp-json\/wp\/v2\/media?parent=1978"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/blog.ymyzk.com\/wp-json\/wp\/v2\/categories?post=1978"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/blog.ymyzk.com\/wp-json\/wp\/v2\/tags?post=1978"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}Gemfile<\/code> \u3084
Gemfile.lock<\/code>\uff0c Python \u3067\u306f
requirements.txt<\/code>\uff0cNode.js \u3067\u306f
package.json<\/code>\uff0c
package-lock.json<\/code>\uff0c
yarn.lock<\/code> \u3068\u3044\u3063\u305f\u30d5\u30a1\u30a4\u30eb\u304c\u30d1\u30c3\u30b1\u30fc\u30b8\u30de\u30cd\u30fc\u30b8\u30e3\u306b\u3088\u3063\u3066\u4f7f\u308f\u308c\u3066\u3044\u307e\u3059\u304c\uff0c\u3053\u306e\u3088\u3046\u306a\u30d5\u30a1\u30a4\u30eb\u306f\u4f55\u306e\u305f\u3081\u306b\u5b58\u5728\u3059\u308b\u306e\u304b\u5206\u304b\u3089\u306a\u3044\u4eba\u3082\u3044\u308b\u304b\u3068\u601d\u3044\u307e\u3059\uff0e<\/p>\n
\u6ce8\u610f<\/h2>\n
\u30d1\u30c3\u30b1\u30fc\u30b8\u3068\u306f<\/h2>\n
\u3082\u3057\u30d1\u30c3\u30b1\u30fc\u30b8\u30de\u30cd\u30fc\u30b8\u30e3\u304c\u306a\u304b\u3063\u305f\u3089<\/h2>\n
mypackage<\/code> \u3068\u3044\u3046\u30d1\u30c3\u30b1\u30fc\u30b8\u306e
hello<\/code> \u3068\u3044\u3046\u95a2\u6570\u3092\u547c\u3073\u51fa\u3059\u30d7\u30ed\u30b0\u30e9\u30e0\u3092\u66f8\u3044\u3066\u307f\u307e\u3059\uff0e<\/p>\n
const mypackage = require(\"mypackage\");\r\nmypackage.hello();\r\n\/\/ Hello, world! \u3068\u8868\u793a\u3055\u308c\u308b<\/code><\/pre>\n
$ mkdir -p node_modules\/mypackage\r\n$ echo '\r\nconst mypackage = require(\"mypackage\");\r\nmypackage.hello();' > main.js\r\n$ node main.js\r\nmodule.js:538\r\n throw err;\r\n ^\r\n\r\nError: Cannot find module 'mypackage'\r\n at Function.Module._resolveFilename (module.js:536:15)\r\n at Function.Module._load (module.js:466:25)\r\n at Module.require (module.js:579:17)\r\n at require (internal\/module.js:11:18)\r\n at Object. (\/tmp\/pack\/main.js:2:19)\r\n at Module._compile (module.js:635:30)\r\n at Object.Module._extensions..js (module.js:646:10)\r\n at Module.load (module.js:554:32)\r\n at tryModuleLoad (module.js:497:12)\r\n at Function.Module._load (module.js:489:3)<\/code><\/pre>\n
hello<\/code> \u3092\u542b\u3080
mypackage<\/code> \u306e\u30bd\u30fc\u30b9\u30b3\u30fc\u30c9\u306f\u6b21\u306e\u3088\u3046\u306b\u306a\u308a\u307e\u3059:<\/p>\n
module.exports.hello = () => console.log(\"Hello, world!\");<\/code><\/pre>\n
node_modules\/<package_name><\/code> \u3068\u3044\u3046\u30c7\u30a3\u30ec\u30af\u30c8\u30ea\u306b\u306b\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3059\u308b\u3053\u3068\u3067\u5229\u7528\u3067\u304d\u307e\u3059\uff0e\u5b9f\u969b\u306b\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3057\u3066\u518d\u5ea6
main.js<\/code> \u3092\u5b9f\u884c\u3057\u3066\u307f\u307e\u3057\u3087\u3046\uff0e\u4eca\u5ea6\u306f\u6b63\u3057\u304f\u30d1\u30c3\u30b1\u30fc\u30b8\u304c\u8aad\u307f\u8fbc\u307e\u308c\u3066\uff0cHello world! \u304c\u8868\u793a\u3055\u308c\u307e\u3059:<\/p>\n
$ mkdir -p node_modules\/mypackage\r\n$ echo 'module.exports.hello = () => console.log(\"Hello, world!\");' > node_modules\/mypackage\/index.js\r\n$ node main.js \r\nHello, world!<\/code><\/pre>\n
\u30d1\u30c3\u30b1\u30fc\u30b8\u306e\u30d5\u30a9\u30fc\u30de\u30c3\u30c8\u30fb\u30e1\u30bf\u30c7\u30fc\u30bf<\/h2>\n
setup.py<\/code>\uff0cRuby \u3067\u306f
<name>.gemspec<\/code>\uff0cNode.js (JavaScript) \u3067\u306f
package.json<\/code> \u3068\u3044\u3063\u305f\u540d\u524d\u306b\u306a\u3063\u3066\u3044\u307e\u3059\uff0eNode.js \u3067\u306e\u30e1\u30bf\u30c7\u30fc\u30bf\u306e\u4f8b\u3092\u4ee5\u4e0b\u306b\u6319\u3052\u307e\u3059:<\/p>\n
{\r\n \"name\": \"mypackage\",\r\n \"version\": \"1.2.3\",\r\n \"description\": \"My First Package\",\r\n \"main\": \"index.js\",\r\n \"author\": \"Yusuke Miyazaki\",\r\n \"license\": \"MIT\"\r\n}<\/code><\/pre>\n
my_package_manager install https:\/\/example.com\/packages\/mypackage.zip<\/code><\/pre>\n
\n
\u30d1\u30c3\u30b1\u30fc\u30b8\u30a4\u30f3\u30c7\u30c3\u30af\u30b9\u30fb\u30ea\u30dd\u30b8\u30c8\u30ea<\/h2>\n
npm install lodash<\/code> \u3068\u3059\u308b\u3068 npmjs.com \u3067\u516c\u958b\u3055\u308c\u3066\u3044\u308b lodash<\/a> \u3092\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3057\u3066\u304f\u308c\u307e\u3059\uff0e<\/p>\n
\u4f9d\u5b58\u95a2\u4fc2\u306e\u8a18\u8ff0\u3068\u89e3\u6c7a<\/h2>\n
{\r\n \"dependencies\": {\r\n \"lodash.assign\": \">=4.2\",\r\n \"lodash.clonedeep\": \"^4.0\",\r\n \"lodash.debounce\": \"<5.0\",\r\n \"lodash.get\": \"4.4.2\",\r\n \"lodash.isequal\": \"~4.0\"\r\n }\r\n}<\/code><\/pre>\n
\u4f9d\u5b58\u95a2\u4fc2\u306e\u30ed\u30c3\u30af<\/h2>\n
Gemfile.lock<\/code>\uff0cNode.js \u306e npm \u3067\u306f
package-lock.json<\/code>\uff0cyarn \u3067\u306f
yarn.lock<\/code> \u304c\u3042\u308a\u307e\u3059\uff0enpm \u3067 express \u3092\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3057\u305f\u3068\u304d\u306e
package.json<\/code>\u00a0\u3068
package-lock.json<\/code> (\u4e00\u90e8\u7701\u7565) \u306e\u4f8b\u3092\u305d\u308c\u305e\u308c\u7d39\u4ecb\u3057\u307e\u3059:<\/p>\n
{\r\n \"dependencies\": {\r\n \"express\": \"^4.16.2\"\r\n }\r\n}<\/code><\/pre>\n
{\r\n \"requires\": true,\r\n \"lockfileVersion\": 1,\r\n \"dependencies\": {\r\n \"accepts\": {\r\n \"version\": \"1.3.4\",\r\n \"resolved\": \"https:\/\/registry.npmjs.org\/accepts\/-\/accepts-1.3.4.tgz\",\r\n \"integrity\": \"sha1-hiRnWMfdbSGmR0\/whKR0DsBesh8=\",\r\n \"requires\": {\r\n \"mime-types\": \"2.1.17\",\r\n \"negotiator\": \"0.6.1\"\r\n }\r\n },\r\n \"etag\": {\r\n \"version\": \"1.8.1\",\r\n \"resolved\": \"https:\/\/registry.npmjs.org\/etag\/-\/etag-1.8.1.tgz\",\r\n \"integrity\": \"sha1-Qa4u62XvpiJorr\/qg6x9eSmbCIc=\"\r\n },\r\n \"express\": {\r\n \"version\": \"4.16.2\",\r\n \"resolved\": \"https:\/\/registry.npmjs.org\/express\/-\/express-4.16.2.tgz\",\r\n \"integrity\": \"sha1-41xt\/i1kt9ygpc1PIXgb4ymeB2w=\",\r\n \"requires\": {\r\n \"accepts\": \"1.3.4\",\r\n \"array-flatten\": \"1.1.1\",\r\n \"body-parser\": \"1.18.2\",\r\n \"content-disposition\": \"0.5.2\",\r\n \"content-type\": \"1.0.4\",\r\n \"cookie\": \"0.3.1\",\r\n \"cookie-signature\": \"1.0.6\",\r\n \"debug\": \"2.6.9\",\r\n \"depd\": \"1.1.1\",\r\n \"encodeurl\": \"1.0.1\",\r\n \"escape-html\": \"1.0.3\",\r\n \"etag\": \"1.8.1\",\r\n \"finalhandler\": \"1.1.0\",\r\n \"fresh\": \"0.5.2\",\r\n \"merge-descriptors\": \"1.0.1\",\r\n \"methods\": \"1.1.2\",\r\n \"on-finished\": \"2.3.0\",\r\n \"parseurl\": \"1.3.2\",\r\n \"path-to-regexp\": \"0.1.7\",\r\n \"proxy-addr\": \"2.0.2\",\r\n \"qs\": \"6.5.1\",\r\n \"range-parser\": \"1.2.0\",\r\n \"safe-buffer\": \"5.1.1\",\r\n \"send\": \"0.16.1\",\r\n \"serve-static\": \"1.13.1\",\r\n \"setprototypeof\": \"1.1.0\",\r\n \"statuses\": \"1.3.1\",\r\n \"type-is\": \"1.6.15\",\r\n \"utils-merge\": \"1.0.1\",\r\n \"vary\": \"1.1.2\"\r\n }\r\n }\r\n }\r\n}<\/code><\/pre>\n
\u307e\u3068\u3081<\/h2>\n
\n