2017-03-11 67 views
0

我有支持angular2的java webapp。angular-cli簡單配置,無需測試和ng服務

.java和.ts文件的打包和編譯是通過maven完成的,然後我們使用spring-boot運行.war文件,該文件給出了代碼的熱部署。

我想使用angular-cli只能達到同意,生成組件,服務等。我沒有計劃添加茉莉花測試,所以我不擔心測試,服務器配置等。我做不想要webpacking和額外的angular-cli垃圾文件。只有已經在package.json 中定義的內容是否有一種方法可以在現有項目上使用angular-cli來生成文件結構?

以下是項目和文件結構。

src/main/webapp 
src/main/webapp/package.json 
src/main/webapp/systemjs.config.js 
src/main/webapp/app 
src/main/webapp/main.ts 
src/main/webapp/module.ts 
src/main/webapp/component.ts 
src/main/webapp/landing.html 
src/main/webapp/node_modules 

以下是我package.json

{ 
    "name": "angular-simple-start", 
    "version": "1.0.0", 
    "description": "Simple app", 
    "scripts": { 
    }, 
    "dependencies": { 
    "@angular/common": "~2.4.0", 
    "@angular/compiler": "~2.4.0", 
    "@angular/core": "~2.4.0", 
    "@angular/forms": "~2.4.0", 
    "@angular/http": "~2.4.0", 
    "@angular/platform-browser": "~2.4.0", 
    "@angular/platform-browser-dynamic": "~2.4.0", 
    "@angular/router": "~3.4.0", 

    "angular-in-memory-web-api": "~0.2.4", 
    "systemjs": "0.19.40", 
    "core-js": "^2.4.1", 
    "rxjs": "5.0.1", 
    "zone.js": "^0.7.4" 
    }, 
    "devDependencies": { 
    "concurrently": "^3.2.0", 
    "typescript": "~2.0.10", 
    "@types/node": "^6.0.46", 
    }, 

} 

回答

4

我不知道這是否回答你的問題,但你可以使用此命令行創建最小的應用程序,沒有任何的測試:

ng new --skip-test --minimal <project_name>