Dependencies and devDependencies
You have all your dependencies installed now. You start working and during the development process, you may need some other dependencies to improve your code. You just need to run the NPM CLI to get the new dependency, but this will not be present in your package.json file! It can be very dangerous, because if you don't have the list of libraries or dependencies you need for your project, when you want to run it in a different machine, your code will fail, because the dependency is not installed in that machine.
We can ensure that the new package name will be added to our dependencies' list, adding the –-save or –-save-dev flag. The first will add the package name to the dependencies' section of the package.json file. This means that the dependency is mandatory for the application itself and should be installed before running or deploying the application. On the other hand, we have the devDependencies' part, where there will be only the dependencies used for our development process:
$ npm install <package_name> --save
Now, we are ready to start developing JavaScript applications. In the next section, you will make use of NPM to install the Aurelia command-line tool required to create new Aurelia projects, but let's continue exploring the Aurelia framework.
- 社交網(wǎng)絡對齊
- C++黑客編程揭秘與防范
- INSTANT PhpStorm Starter
- 5G承載網(wǎng)網(wǎng)絡規(guī)劃與組網(wǎng)設計
- 物聯(lián)網(wǎng)檢驗檢測技術
- 通信簡史:從信鴿到6G+
- 數(shù)字調(diào)制解調(diào)技術的MATLAB與FPGA實現(xiàn):Altera/Verilog版(第2版)
- 圖解手機元器件維修技巧
- 異構蜂窩網(wǎng)絡關鍵理論與技術
- 世界互聯(lián)網(wǎng)發(fā)展報告2021
- 區(qū)塊鏈技術與應用:打造分布式商業(yè)新生態(tài)
- Architecting Data:Intensive Applications
- ReasonML Quick Start Guide
- 無線傳感器網(wǎng)絡定位方法及應用
- 萬物互聯(lián):物聯(lián)網(wǎng)核心技術與安全