美文网首页
yarn 笔记

yarn 笔记

作者: 不知道的是 | 来源:发表于2018-06-21 05:40 被阅读0次

    Usage

    Starting a new project

    yarn init
    

    Adding a dependency

    yarn add [package]
    yarn add [package]@[version]
    yarn add [package]@[tag]
    

    Adding a dependency to different categories of dependencies

    Add to devDependencies, peerDependencies, and optionalDependencies respectively:

    yarn add [package] --dev
    yarn add [package] --peer
    yarn add [package] --optional
    

    Upgrading a dependency

    yarn upgrade [package]
    yarn upgrade [package]@[version]
    yarn upgrade [package]@[tag]
    

    Removing a dependency

    yarn remove [package]
    

    Installing all the dependencies of project

    yarn
    

    or

    yarn install
    

    参考资料:
    https://yarnpkg.com/en/docs/usage

    相关文章

      网友评论

          本文标题:yarn 笔记

          本文链接:https://www.haomeiwen.com/subject/taifyftx.html