Thursday, May 23, 2024
 Popular · Latest · Hot · Upcoming
154
rated 0 times [  156] [ 2]  / answers: 1 / hits: 15865  / 9 Years ago, mon, january 11, 2016, 12:00:00

I'm not willing to use typescript compiler provided in angular 2 quick start guide and will use gulp.js instead. However there are few questions I have about package.json file provided on angular website:



{
name: angular-starter,
version: 1.0.0,
scripts: {
tsc: tsc,
tsc:w: tsc -w,
lite: lite-server,
start: concurrent npm run tsc:w npm run lite
},
license: ISC,
dependencies: {
angular2: 2.0.0-beta.0,
systemjs: 0.19.6,
es6-promise: ^3.0.2,
es6-shim: ^0.33.3,
reflect-metadata: 0.1.2,
rxjs: 5.0.0-beta.0,
zone.js: 0.5.10
},
devDependencies: {
concurrently: ^1.0.0,
lite-server: ^1.3.1,
typescript: ^1.7.3
}
}


I'm sure that few things like tsc, tsc:w script comands alongside typescript devDependency can be safely removed, but am not sure about purpose for things like concurently dependency as well as dependency section in general, could you guys provide more info on all dependencies that follow angular2? I tried looking these up in quickstart guide along apendixes, but had no luck as they are very short.


More From » angularjs

 Answers
87

concurently is and npm package which allows to run multiple CLI commands in one shot, see line below in package.json. concurrent command is coming from concurrenlty. You can remove that safely.



start: concurrent npm run tsc:w npm run lite 


dependency section in package.json file lets you keep track of project dependencies. Using reference of these packages in dependency section allows you to use module bundler like webpack, browserify etc. It also keeps your project linked to specific versions of each of these packages if new version introduce any breaking changes etc. Having this section in package.json file lets you remove packages directory (node_modules) to be under source control. Installing these packages again on lets say another machine requires only package.json and dependency section in it.



For each package in dependency section search npmjs website for more details.


[#63768] Friday, January 8, 2016, 9 Years  [reply] [flag answer]
Only authorized users can answer the question. Please sign in first, or register a free account.
shelbiec

Total Points: 101
Total Questions: 106
Total Answers: 106

Location: Ivory Coast
Member since Fri, Oct 8, 2021
3 Years ago
;