{"id":1938,"date":"2016-03-12T19:52:09","date_gmt":"2016-03-13T00:52:09","guid":{"rendered":"http:\/\/bitpost.com\/news\/?p=1938"},"modified":"2016-03-12T21:03:22","modified_gmt":"2016-03-13T03:03:22","slug":"node-can-bend","status":"publish","type":"post","link":"https:\/\/bitpost.com\/news\/2016\/node-can-bend\/","title":{"rendered":"Node.js can bend"},"content":{"rendered":"<p>There are three progressively-deeper methods\u00a0of installing your node modules, all useful in their own way:<\/p>\n<ul>\n<li><strong>npm link<\/strong> sets up symlinks to your commands<br \/>\nThey will point directly to your code, which you can dynamically change to see the result. \u00a0This is best for early development.<\/li>\n<li><strong>npm install -g<\/strong> of a package with dependent modules listed on the local drive<br \/>\nThis will use the locally installed version of the dependent module that was also installed with [npm install -g]. \u00a0Format:<\/li>\n<\/ul>\n<pre style=\"padding-left: 30px;\"><code>\"dependencies\": {<\/code>\r\n<code>  \"rad-scripts\": \"file:\/\/\/home\/m\/development\/thedigitalage\/rad-scripts\"<\/code>\r\n<code>},\r\n<\/code><\/pre>\n<ul>\n<li><strong>npm install -g<\/strong> of a package with officially published dependent modules<br \/>\nThis will use the latest\u00a0publicly available\u00a0version of the dependent module. \u00a0In this example, the latest version above 1.0.3 will be used. \u00a0Format:<\/li>\n<\/ul>\n<pre style=\"padding-left: 30px;\"><code>\"dependencies\": {<\/code>\r\n<code>  \"rad-scripts\": \"^1.0.3\"<\/code>\r\n<code>},\r\n<\/code><\/pre>\n<p>It is\u00a0so easy to publish your own node modules. \u00a0I glided right through these and now have a <a href=\"https:\/\/www.npmjs.com\/package\/rad-scripts\">published module<\/a> of reusable scripts.<\/p>\n<p>Here&#8217;s a quick summary of the lifecycle of publishing your module:<\/p>\n<pre><code>npm install -g \r\n# you can now test this module in another\u00a0module if you use a [file:] dependency in the other module\r\n# keep doing this until you are happy with local install\r\n# when ready...\r\n# update version in package.json\r\ngit commit -a -m \"1.0.5\"\r\ngit tag 1.0.5\r\ngit push &amp;&amp; git push --tags  # NOTE: bitpost has a git hook to push changes all the way up to github\r\nnpm publish<\/code><\/pre>\n","protected":false},"excerpt":{"rendered":"<p>There are three progressively-deeper methods\u00a0of installing your node modules, all useful in their own way: npm link sets up symlinks to your commands They will point directly to your code, which you can dynamically change to see the result. \u00a0This is best for early development. npm install -g of a package with dependent modules listed [&hellip;]<\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"jetpack_post_was_ever_published":false,"_jetpack_newsletter_access":"","_jetpack_dont_email_post_to_subs":false,"_jetpack_newsletter_tier_id":0,"_jetpack_memberships_contains_paywalled_content":false,"_jetpack_memberships_contains_paid_content":false,"footnotes":"","jetpack_publicize_message":"","jetpack_publicize_feature_enabled":true,"jetpack_social_post_already_shared":false,"jetpack_social_options":{"image_generator_settings":{"template":"highway","default_image_id":0,"enabled":false},"version":2}},"categories":[216],"tags":[],"class_list":["post-1938","post","type-post","status-publish","format-standard","hentry","category-node-js"],"aioseo_notices":[],"jetpack_publicize_connections":[],"jetpack_featured_media_url":"","jetpack_sharing_enabled":true,"jetpack_shortlink":"https:\/\/wp.me\/p9M11L-vg","jetpack_likes_enabled":true,"_links":{"self":[{"href":"https:\/\/bitpost.com\/news\/wp-json\/wp\/v2\/posts\/1938","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/bitpost.com\/news\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/bitpost.com\/news\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/bitpost.com\/news\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/bitpost.com\/news\/wp-json\/wp\/v2\/comments?post=1938"}],"version-history":[{"count":8,"href":"https:\/\/bitpost.com\/news\/wp-json\/wp\/v2\/posts\/1938\/revisions"}],"predecessor-version":[{"id":1947,"href":"https:\/\/bitpost.com\/news\/wp-json\/wp\/v2\/posts\/1938\/revisions\/1947"}],"wp:attachment":[{"href":"https:\/\/bitpost.com\/news\/wp-json\/wp\/v2\/media?parent=1938"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/bitpost.com\/news\/wp-json\/wp\/v2\/categories?post=1938"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/bitpost.com\/news\/wp-json\/wp\/v2\/tags?post=1938"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}