Basic Coding Info

Yarn Basics

brightlightkim 2022. 6. 14. 08:22

 

yarn init: npm init

- name

- version

- entry point

- repository url

- package.json file

 

yarn config set init-license ISC

- change the setting (default)

 

yarn config get init-license

- Shows that it's ISC

 

yarn add [package name]

- npm install 

 

yarn remove [package]

- remove the name and from the dependency

 

yarn add [package]@[version number]

- creates the specific package

 

yarn outdated [Condititional: package name >> check the specific package]

- see outdated versions

 

yarn upgrade

- it updates to the latest versions.

 

yarn global add [package name, ex: nodemon]

- continually check for the global variable

 

yarn global remove [package name]

- removes the package

 

yarn global bin

- check where the global bin is..

 

yarn list --depth:0

- just see the top layer

 

yarn list --pattern gulp

- just the dependency for the gulp

 

yarn add gulp -D

- gulp is added to the development dependency

 

yarn remove gulp

- remove from the dev dependency

 

yarn.lock

- shows all the dependency files

 

yarn check

- to check if the files are in sync

 

scripts: {

    "dev": "nodemon index.js"

}

>> yarn run dev >> calls for the nodemon index.js

 

yarn run: npm run

 

yarn licenses list

- shows all the different licenses

 

yarn pack

 

yarn cache list --pattern [package name]

- gives all the info that saved in cache.