We have all the necessary files gathered in our Angular application. Let’s go ahead and understand what they are going to do.

Package.json

Generally, our Angular application requires libraries or modules specified in package.json file. So, whenever we run npm install command prompt, all the dependencies are installed to the folder named node_modules, as shown below.

Now, for our Angular application, we are going to use TypeScript which is nothing but a super script of JS. So, coming back to the script in package.json as shown below.

{

"name": "angular",

"version": "1.0.0",

"scripts": {

"start": "tsc && concurrently \"npm run tsc:w\" \"npm run lite\" ",

"lite": "lite-server",

"postinstall": "typings install",

"tsc": "tsc",

"tsc:w": "tsc -w",

"typings": "typings"

},

"license": "ISC",

"dependencies": {

"@angular/common": "2.0.0-rc.1",

"@angular/compiler": "2.0.0-rc.1",

"@angular/core": "2.0.0-rc.1",

"@angular/http": "2.0.0-rc.1",

"@angular/platform-browser": "2.0.0-rc.1",

"@angular/platform-browser-dynamic": "2.0.0-rc.1",

"@angular/router": "2.0.0-rc.1",

"@angular/router-deprecated": "2.0.0-rc.1",

"@angular/upgrade": "2.0.0-rc.1",

"systemjs": "0.19.27",

"es6-shim": "^0.35.0",

"reflect-metadata": "^0.1.3",

"rxjs": "5.0.0-beta.6",

"zone.js": "^0.6.12",

"angular2-in-memory-web-api": "0.0.7",

"bootstrap": "^3.3.6"

},

"devDependencies": {

"concurrently": "^2.0.0",

"lite-server": "^2.2.0",

"typescript": "^1.8.10",

"typings": "^0.8.1"

}

}

When mouse over on script, we will see a text “Run by npm start command”. So, when we run this command, it is going to start TypeScript compiler and it is also going to run lite-server which is going to host our application.

And we also going to start TypeScript compiler in watch mode. That means, any change in code is automatically compiled and browser is refreshed.

Then, we have postinstall over in scripts. It means, once we start installing dependencies, install type installs json files.