美文网首页
nodejs 版本管理 nodist

nodejs 版本管理 nodist

作者: bobo_lee | 来源:发表于2017-06-21 11:29 被阅读0次

    用过node的朋友都知道,node版本更新非常快,然而开发用到的node版本不一定会统一,为了保证环境一样,一个nodejs包管理非常重要。这种包管理器,需要不但能够快速简洁下载各个版本的node包,更加需要能够进行版本的切换。
    笔者环境:windows10 64位
    笔者适用了 nvm, nvm-windows,n,以及nodist

    前三者都是虽然都用windows版本,但是其兼容性较差,在笔者环境中老是出现各种bug,一番折腾后,仍然不得解。时间就是生命,当用到nodist之后,感觉非常棒
    附上链接:
    https://github.com/marcelklehr/nodist

    以下是nodist的命令,笔者默默做个笔记

    nodist

    Lists installed versions highlighting the active ones.

    nodist global 4.x

    Sets the global node version requirement

    nodist local 4.x

    Sets the node version requirement per directory (including all subdirectories).

    nodist env 4.x

    Sets the node version requirement per terminal.

    nodist npm global 3.x

    Set global npm version requirement.

    nodist npm global match

    Tell nodist to always choose the npm version that matches the current node version.
    (the current node version may be determined by env, local or global requirements)

    nodist npm local 2.x

    Set the npm version requirement for the current directory.

    nodist npm env 2.x

    Set the npm version requirement for the current terminal environment.

    call nodist env 4.x

    In a batch script use call.

    nodist dist

    Lists all available node versions.

    nodist + 4.x

    Just checks, if the version is installed and installs it if not.

    nodist + all

    will install everything.

    nodist - 4.1.1

    Removes a version.

    nodist --help

    Displays a complete list of commands with examples.

    相关文章

      网友评论

          本文标题: nodejs 版本管理 nodist

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