官术网_书友最值得收藏!

Installing NPM packages

NPM is installed and configured; now it's time to start working. There are two ways to install NPM packages. Our choice will depend on how we want to use the package. The options are as listed:

  • Globally: Install the given package globally as part of our command-line tools
  • Locally: Install the given package to be available only in our application context

With this in mind, type the following command to install a new package:

$ npm install <package-name>

This instruction will create a folder called node_modules, where we will download all the packages we need. We can ensure that we have the package downloaded, entering the folder and checking the existence of a folder with a name similar to our package name. Run the following command to list all the packages installed in your project:

$ ls node_modules
主站蜘蛛池模板: 黔南| 乐安县| 随州市| 灵石县| 乌兰察布市| 包头市| 车险| 雅江县| 和平县| 海盐县| 莫力| 惠州市| 沁源县| 庆云县| 峨山| 汉川市| 安图县| 马边| 闽清县| 白河县| 六安市| 丹寨县| 永嘉县| 济宁市| 和政县| 白山市| 许昌县| 拉萨市| 张家川| 武冈市| 宁强县| 曲沃县| 滦平县| 靖边县| 乐至县| 鲁甸县| 璧山县| 花莲市| 南投市| 剑川县| 长顺县|