Angular CLI创建的项目文件用途一栏
生活随笔
收集整理的這篇文章主要介紹了
Angular CLI创建的项目文件用途一栏
小編覺得挺不錯的,現在分享給大家,幫大家做個參考.
官網介紹地址:https://angular.io/guide/file-structure
我用Angular CLI創建的項目結構列表:
- .editorconfig:
EditorConfig helps maintain consistent coding styles for multiple developers working on the same project across various editors and IDEs. 確保一個團隊里多個開發人員,即使采用不同的IDE,也能基于同一的編碼風格進行開發。
- angular.json: CLI configuration defaults for all projects in the workspace, including configuration options for build, serve, and test tools that the CLI uses, such as TSLint, Karma, and Protractor.
一個例子:
{"$schema": "./node_modules/@angular/cli/lib/config/schema.json","version": 1,"newProjectRoot": "projects","projects": {"my-first-project": {"projectType": "application","schematics": {},"root": "","sourceRoot": "src","prefix": "app","architect": {"build": {"builder": "@angular-devkit/build-angular:browser","options": {"outputPath": "dist/my-first-project","index": "src/index.html","main": "src/main.ts","polyfills": "src/polyfills.ts","tsConfig": "tsconfig.app.json","aot": true,"assets": ["src/favicon.ico","src/assets"],"styles": ["src/styles.css"],"scripts": []},"configurations": {"production": {"fileReplacements": [{"replace": "src/environments/environment.ts","with": "src/environments/environment.prod.ts"}],"optimization": true,"outputHashing": "all","sourceMap": false,"extractCss": true,"namedChunks": false,"extractLicenses": true,"vendorChunk": false,"buildOptimizer": true,"budgets": [{"type": "initial","maximumWarning": "2mb","maximumError": "5mb"},{"type": "anyComponentStyle","maximumWarning": "6kb","maximumError": "10kb"}]}}},"serve": {"builder": "@angular-devkit/build-angular:dev-server","options": {"browserTarget": "my-first-project:build"},"configurations": {"production": {"browserTarget": "my-first-project:build:production"}}},"extract-i18n": {"builder": "@angular-devkit/build-angular:extract-i18n","options": {"browserTarget": "my-first-project:build"}},"test": {"builder": "@angular-devkit/build-angular:karma","options": {"main": "src/test.ts","polyfills": "src/polyfills.ts","tsConfig": "tsconfig.spec.json","karmaConfig": "karma.conf.js","assets": ["src/favicon.ico","src/assets"],"styles": ["src/styles.css"],"scripts": []}},"lint": {"builder": "@angular-devkit/build-angular:tslint","options": {"tsConfig": ["tsconfig.app.json","tsconfig.spec.json","e2e/tsconfig.json"],"exclude": ["**/node_modules/**"]}},"e2e": {"builder": "@angular-devkit/build-angular:protractor","options": {"protractorConfig": "e2e/protractor.conf.js","devServerTarget": "my-first-project:serve"},"configurations": {"production": {"devServerTarget": "my-first-project:serve:production"}}}}}},"defaultProject": "my-first-project" }要獲取更多Jerry的原創文章,請關注公眾號"汪子熙":
總結
以上是生活随笔為你收集整理的Angular CLI创建的项目文件用途一栏的全部內容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: SAP CRM Fiori应用如何启用S
- 下一篇: Angular workspace默认的