markdown 纱线CLI

Posted

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了markdown 纱线CLI相关的知识,希望对你有一定的参考价值。

# GET VERSION
yarn -v (or --version)

# GET HELP
yarn help

# CREATE PACKAGE.JSON
yarn init
yarn init -y // Use defaults

# SET DEFAULTS
yarn config set init-license ISC

# GET DEFAULTS
yarn config get init-license

# REMOVE DEFAULTS
yarn delete init-license

# INSTALLING LOCAL PACKAGES
yarn add lodash
yarn add moment

# INSTALL FROM PACKAGE.JSON
(add "gulp":"*")
yarn install

# REMOVING MODULES
yarn remove lodash

# INSTALL CERTAIN VERSIONS
yarn add lodash@4.17.3

# FIND OUTDATED VERSIONS
yarn outdated lodash
yarn outdated

# UPGRADE
yarn upgrade lodash
yarn upgrade

# INSTALL GLOBAL MODULE (global must be put right after yarn)
yarn global add nodemon

# FIND ROOT FOLDER
yarn global bin

# REMOVE GLOBAL PACKAGES
yarn global remove nodemon

# LISTING PACKAGES
yarn list
yarn list --depth=0
yarn list --depth=1
yarn list --pattern gulp

# INSTALLING AS DEV DEPENDENCY
yarn add gulp -D or --dev

# REMOVE DEV DEPENDENCY
yarn remove gulp

#VERIFY THAT VERSIONS MATCH LOCK FILE
yarn check

# CREATE YARN.LOCK FILE
yarn import

# ADD SCRIPT
"scripts": {
    "dev": "nodemon index.js"
  },


# RUN SCRIPT
yarn run dev

# GET LICENSES
yarn license

# CREATE GZIP ARCHIVE OF DEPENDENCIES
yarn pack
yarn pack mydep

# LIST GLOBAL CACHE PACKAGES
yarn cache list
yarn cache list --pattern lodash

以上是关于markdown 纱线CLI的主要内容,如果未能解决你的问题,请参考以下文章

Expo CLI 通过纱线安装,但无法正常工作

markdown 配置纱线和npm

markdown 纱线指挥

markdown 纱线可以做到吗?

带有纱线工作区的 Oclif

markdown 如何最终使用纱线重新安装fkn'node-sass并且不破坏包结构.md