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’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’s root directory !
Task | npm | yarn |
Create the build directory | npm run build | yarn run build |
Update all packages | npm install | yarn (synonyms to yarn install) |