{"id":1507,"date":"2022-01-17T23:29:00","date_gmt":"2022-01-17T23:29:00","guid":{"rendered":"https:\/\/www.ridiculously-simple.com\/?p=1507"},"modified":"2022-09-30T17:49:41","modified_gmt":"2022-09-30T17:49:41","slug":"what-is-yarn","status":"publish","type":"post","link":"https:\/\/www.voodoo.business\/blog\/2022\/01\/17\/what-is-yarn\/","title":{"rendered":"What is YARN and npm"},"content":{"rendered":"\n<p>yarn to JavaScript, is what composer is to PHP, a dependency manager, meant to replace npm, but still works with npm<\/p>\n\n\n\n<p><code>package.json<\/code> is the file that dictated the dependencies for npm<\/p>\n\n\n\n<p>So, a small comparison of yarn commands (executed in the terminal in the project&#8217;s directory which produces a build directory within that directory), the build directory is what you serve the world, in other words, it is what you put in your website&#8217;s root directory !<\/p>\n\n\n\n<figure class=\"wp-block-table is-style-stripes\"><table><tbody><tr><td>Task<\/td><td>npm<\/td><td>yarn<\/td><\/tr><tr><td>Create the build directory<\/td><td>npm run build<\/td><td>yarn run build<\/td><\/tr><tr><td>Update all packages<\/td><td>npm install<\/td><td>yarn (synonyms to yarn install)<\/td><\/tr><\/tbody><\/table><\/figure>\n","protected":false},"excerpt":{"rendered":"<p>yarn to JavaScript, is what composer is to PHP, a dependency manager, meant to replace npm, but still works with npm package.json is the file that dictated the dependencies for npm So, a small comparison of yarn commands (executed in the terminal in the project&#8217;s directory which produces a build directory within that directory), the [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[126,127],"tags":[],"class_list":["post-1507","post","type-post","status-publish","format-standard","hentry","category-javascript","category-yarn-and-npm"],"_links":{"self":[{"href":"https:\/\/www.voodoo.business\/blog\/wp-json\/wp\/v2\/posts\/1507","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.voodoo.business\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.voodoo.business\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.voodoo.business\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.voodoo.business\/blog\/wp-json\/wp\/v2\/comments?post=1507"}],"version-history":[{"count":4,"href":"https:\/\/www.voodoo.business\/blog\/wp-json\/wp\/v2\/posts\/1507\/revisions"}],"predecessor-version":[{"id":1575,"href":"https:\/\/www.voodoo.business\/blog\/wp-json\/wp\/v2\/posts\/1507\/revisions\/1575"}],"wp:attachment":[{"href":"https:\/\/www.voodoo.business\/blog\/wp-json\/wp\/v2\/media?parent=1507"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.voodoo.business\/blog\/wp-json\/wp\/v2\/categories?post=1507"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.voodoo.business\/blog\/wp-json\/wp\/v2\/tags?post=1507"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}