更新时间:2021-12-02 07:58:34
官网地址:https://angular.io/guide/npm-packages
一个Hello World级别的Angular应用的DevDependencies:
"devDependencies": { "@angular-devkit/build-angular": "~0.1000.5", "@angular/cli": "~10.0.5", "@angular/compiler-cli": "~10.0.6", "@types/node": "^12.11.1", "@types/jasmine": "~3.5.0", "@types/jasminewd2": "~2.0.3", "codelyzer": "^6.0.0", "jasmine-core": "~3.5.0", "jasmine-spec-reporter": "~5.0.0", "karma": "~5.0.0", "karma-chrome-launcher": "~3.1.0", "karma-coverage-istanbul-reporter": "~3.0.2", "karma-jasmine": "~3.3.0", "karma-jasmine-html-reporter": "^1.5.0", "protractor": "~7.0.0", "ts-node": "~8.3.0", "tslint": "~6.1.0", "typescript": "~3.9.5" }
使用下列的命令行添加DevDependencies:
npm install --save-dev
yarn add --dev
默认的Angular应用DevDependencies:
@angular‑devkit/
build‑angular: The Angular build tools.
@angular/cli: The Angular CLI tools.
@angular/
compiler‑cli: The Angular compiler, which is invoked by the Angular CLI’s ng build and ng serve commands.
@types/…:TypeScript definition files for 3rd party libraries such as Jasmine and Node.js.
jasmine/… : Packages to support the Jasmine test library.
karma/… : Packages to support the karma test runner.
protractor : An end-to-end (e2e) framework for Angular apps. Built on top of WebDriverJS.
ts-node: TypeScript execution environment and REPL for Node.js.
tslint: A static analysis tool that checks TypeScript code for readability, maintainability, and functionality errors.
typescript: The TypeScript language server, including the tsc TypeScript compiler.