- Hands-On Full Stack Web Development with Angular 6 and Laravel 5
- Fernando Monteiro
- 218字
- 2021-07-23 19:18:54
The package.json file
The package.json file is very common in web applications that use Node.js modules. It is often found in frontend applications nowadays, in addition to server-side applications with Node.js. With the Angular framework, it is not different; this is one of the great advantages of the new version of Angular, since we can only import modules that are extremely necessary for the application, reducing the size and build time. Let's look at the contents of the package.json file. We added some comments before each important section:
{
"name": "chapter03",
"version": "0.0.0",
"license": "MIT",
// Npm commands, based on Angular/Cli commands, including: test and build.
"scripts": {
"ng": "ng",
"start": "ng serve",
"build": "ng build --prod",
"test": "ng test",
"lint": "ng lint",
"e2e": "ng e2e"
},
"private": true,
// Dependencies to work in production, including:
@angular/core, @angular/common, @angular/route and many more.
"dependencies":{
...
},
// Dependencies only in development environment, including modules for test, TypeScript version, Angular/Cli installed locally and others.
"devDependencies": {
...
}
}
This file is automatically changed when we install a new module. And, we often add some commands inside the tag scripts, as you will see in the next chapters. You can read more about the package.json file in the official npm documentation at https://docs.npmjs.com/files/package.json.
- 廣電5G從入門到精通
- 連接未來:從古登堡到谷歌的網絡革命
- Hands-On Chatbot Development with Alexa Skills and Amazon Lex
- Django 2 by Example
- 新一代物聯網架構技術:分層算力網絡
- Go Web Scraping Quick Start Guide
- Metasploit Penetration Testing Cookbook
- 圖解手機元器件維修技巧
- Bonita Open Solution 5.x Essentials
- SAE原理與網絡規劃
- INSTANT LinkedIn Customization How-to
- Implementing NetScaler VPX?
- Guide to NoSQL with Azure Cosmos DB
- 現場綜合化網絡運營與維護:運營商數字化轉型技術與實踐
- 智能物聯網:區塊鏈與霧計算融合應用詳解