what does gulp-“cli” stands for?

后端 未结 2 930
孤独总比滥情好
孤独总比滥情好 2020-12-23 17:47

Can someone please explain what exactly are the differences between the following two methods of gulp installation:

$ npm install --global gulp-cli


        
相关标签:
2条回答
  • 2020-12-23 18:25

    The goal of gulp-cli is to let you use gulp like a global program, but without installing gulp globally.

    For example if you installed gulp 3.9.1 globally and your project testGulp4 has gulp 4.0 installed locally, what would happen if you run gulp -v into testGulp4?

    • Without gulp-cli globally installed :

      CLI version 3.9.1
      

      In this case the version displayed is the global version of gulp. The local version 4.0 is totally ignored.

    • With gulp-cli globally installed :

      CLI version 1.2.1
      Local version 4.0.0-alpha.2
      

      In this case the version displayed is the global version of gulp-cli and the local version of gulp. The global gulp 3.9.1 is totally ignored.

    Conclusion :

    • gulp-cli: is preferred because it allows you to use different versions of gulp.
    • gulp: needs a local version of gulp installed.
    0 讨论(0)
  • 2020-12-23 18:26

    CLI stands for Command Line Interface.

    gulp is a JavaScript library. It lets you use gulp from JavaScript code.

    gulp-cli is a utility program that lets you access gulp from your shell.

    0 讨论(0)
提交回复
热议问题