2016-08-12 2 views
4

Angular 2와 관련된 두 번째 프로젝트를 진행 중입니다. 첫 번째 Angular 2 프로젝트로 워밍업 한 후 Angular 1.5에서 점프하는 동안 패키지를 정리하는 방법에 관심이있었습니다. 핵심 기능을 잃지 않고 package.json 파일에서 무엇을 제거 할 수 있는지 알고 싶습니다. 각 패키지는 무엇을 기여하며 무엇을 예비해야합니까?새로운 Angular 2.0.0-rc.5 프로젝트에 필요한 최소 패키지는 무엇입니까?

{ 
    "name": "angular2-quickstart", 
    "version": "1.0.0", 
    "scripts": { 
    "start": "tsc && concurrently \"npm run tsc:w\" \"npm run lite\" ", 
    "lite": "lite-server", // I use Webstorm, Visual Studio or Xampp 
    "postinstall": "typings install", // ??? 
    "tsc": "tsc", 
    "tsc:w": "tsc -w", // Maybe I will keep 
    "typings": "typings" 
    }, 
    "license": "ISC", 
    "dependencies": { 
    "@angular/common": "2.0.0-rc.5", // ng-if, ng-for seem to reside in here 
    "@angular/compiler": "2.0.0-rc.5", // renders the templates 
    "@angular/core": "2.0.0-rc.5", // :) 
    "@angular/forms": "0.3.0", // I could manage without, I use custom css 
    "@angular/http": "2.0.0-rc.5", // Need it 
    "@angular/platform-browser": "2.0.0-rc.5", // ??? 
    "@angular/platform-browser-dynamic": "2.0.0-rc.5", // ??? 
    "@angular/router": "3.0.0-rc.1", // Need it 
    "@angular/router-deprecated": "2.0.0-rc.2", // Nope 
    "@angular/upgrade": "2.0.0-rc.5", // Nope 
    "systemjs": "0.19.27", // importing modules 
    "core-js": "^2.4.0", // Some polyfills, Does Chrome 52.0 needs it? 
    "reflect-metadata": "^0.1.3", // Decorators ?? 
    "rxjs": "5.0.0-beta.6", // depdency for EventEmitter 
    "zone.js": "^0.6.12", // data bindings don't work wihtout 
    "angular2-in-memory-web-api": "0.0.15", // ??? 
    "bootstrap": "^3.3.6" // No need, I do all my css hand forged to perfection. 
    }, 
    "devDependencies": { 
    "concurrently": "^2.0.0", // Nope 
    "lite-server": "^2.2.0", // Nope 
    "typescript": "^1.8.10", // Nope ? I learned that Webstorm can do this job 
    "typings":"^1.0.4" // Nope ? 
    } 
} 

답변

3

당신은 잘못 짚었하고 있습니다 :

는 여기에 지금까지 이해하는 것입니다.

각도의 코드 크기의 the official blog post accompanying the RC5 release

대략 60 %에서 설명하고있는 바와 같이

는 [이 ...] 그래서 가능 AOT 컴파일하면 사용자에게 해당 코드를 제공하지 않아도 의미 컴파일러

전선을 통해 바이트를 최소화하는 것이 중요하다면 AoT 컴파일을 빌드 프로세스에 통합하여이를 활용하는 방법을 배우는 것이 좋습니다 (질문과 관련하여 compilerplatform-browser-dynamic 모듈을 생산 번들)

최종 릴리스 준비를 위해이 모듈의 크기를 줄이면 is one of the major focuses for RC6이므로 RC5로 수행하는 작업은 대부분 시간 낭비입니다.

관련 문제