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

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
主站蜘蛛池模板: 喀喇| 菏泽市| 兴山县| 绥宁县| 曲周县| 汉中市| 阿拉善左旗| 昌都县| 澎湖县| 乌苏市| 丽江市| 德阳市| 金昌市| 祥云县| 三台县| 阆中市| 黎平县| 莱芜市| 怀仁县| 玛曲县| 洪雅县| 都安| 西充县| 武鸣县| 彭泽县| 都江堰市| 治县。| 丁青县| 兴隆县| 安庆市| 进贤县| 湘乡市| 永州市| 仁怀市| 盐津县| 酉阳| 辉南县| 汝阳县| 桂平市| 墨玉县| 萍乡市|