Nx: provide option to create nx workspace with karma and protractor

Created on 29 Apr 2019  路  4Comments  路  Source: nrwl/nx

Expected Behavior

Provide option to generate workspace with karma and protractor .

Current Behavior

When I run command npx create-nx-workspace myworkspace it asks for framework, after selecting angular it generates angular project with jest and cypress, but I want karma and protractor

  • version of Nx used 7.8.1
  • version of Angular CLI used 7.3.1

Most helpful comment

Presets, which you select when running create-nx-workspace, are just shortcuts--to help you set up your workspace with a single command.

If you want to use karma and protractor, run:

  • create-nx-worskpace myworkspace --preset=empty
  • ng g app angularapp --unit-test-runner=karma --e2e-test-runner=proctractor

You can also set defaults values in angular.json, such that ng g app will always default to karma and protractor.

All 4 comments

Presets, which you select when running create-nx-workspace, are just shortcuts--to help you set up your workspace with a single command.

If you want to use karma and protractor, run:

  • create-nx-worskpace myworkspace --preset=empty
  • ng g app angularapp --unit-test-runner=karma --e2e-test-runner=proctractor

You can also set defaults values in angular.json, such that ng g app will always default to karma and protractor.

@vsavkin not working with 8.0.0-rc.1

Cannot parse arguments. See below for the reasons.
    Argument --unit-test-runner could not be parsed using value "karma". Valid values are: "jest", "none".

@vsavkin Can you add this in help section or some where in your documentation ?

ng g app XXX-app --unit-test-runner=karma --e2e-test-runner=protractor

where xxx is your project-name

Was this page helpful?
0 / 5 - 0 ratings