Explanation for angular 2 package.json file

I do not want to use the typescript compiler, which is presented in angular 2 with a quick start guide and will use gulp.js instead. However, there are a few questions that I have about the package.json file provided on the 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 a few things like a tsc, tsc:wscript, along with typescript devDependency can be safely removed, but I'm not sure of the purpose for things like concurently, and also dependencyin the general section, could you guys provide more information about all the dependencies, following angular2? I tried to find them in the quick start guide for applications, but they were unlucky as they are very short.

+4
2

npm, CLI , . package.json. concurrent concurrenlty. .

"start": "concurrent \"npm run tsc:w\" \"npm run lite\" "

dependency package.json . -, webpack, .. , - .. package.json (node_modules), . , .json dependency .

npmjs .

+3

, @nexus23. , , , , , somene.

Package.json - , , .

  • DevDependency
  • peerDependency . , .

i.e . , , angular2. .

  • angular2 - angular2. . ( angular2 beta)

  • systemjs - - ES6, AMD, CommonJS NodeJS. Traceur, Babel. systemjs Config baseUrl, to Import main file .. i.e index.html, :

    <script> System.config({ baseURL: '<%= APP_BASE %>', paths: {'*': '*.js?v=<%= VERSION %>'}, defaultJSExtensions: true }); </script>

0

Source: https://habr.com/ru/post/1623773/


All Articles