简体   繁体   中英

angular-cli simple configuration without test and ng serve

I have java webapp with angular2 support.

packaging and compilation of .java and .ts files is done through maven, then we run .war using spring-boot that gives hot deployment of code.

I want to use angular-cli only up to a consent, for generating components, services, etc.. i don't have plan to add jasmine tests yet so i am not worried about testing, server configuration etc.. i do not want webpacking and additional angular-cli garbage files either. only what is already defined in package.json is there a way i can use angular-cli on existing project for generating file structure only ?

Following are project and file structure.

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

following is my 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",
  },

}

我不确定这是否可以回答您的问题,但您可以使用此命令行创建最小的应用程序,而无需任何测试:

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

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM