1

I am new to nativescript bot not new to angular. I am learning nativescript with angular at the moment. When generating a component in nativescript-NG project, I am getting the .spec file which is throwing syntax errors. Deleting it solves the problem. In all cases, I want to generate my components, services, modiules... without the .spec file. I used to achieve so in angular using:

ng config schematics.@schematics/angular.component.spec false

Surely replace component by service, module... for others.

This did not succeed in nativescript-Ng which is very true as nativescript uses @nativescript/schematics where angular uses @schematics/angular.

I tried:

ng config schematics.@nativescript/schematics.component.spec false

with no luck.

How can I achive my goal?

georgeawg
  • 48,608
  • 13
  • 72
  • 95
  • maybe Duplicate, check https://stackoverflow.com/questions/40990280/get-component-without-spec-ts-file-in-angularjs-2 – alim91 Feb 22 '20 at 08:25
  • Please read my post carefully, no it is not as the post u mentioned is for angular. What I am asking for is Nativescript-Angular. Different schematics are being used and so the post u mentioned (which I tried) does not work :) – user12942859 Feb 22 '20 at 08:27

1 Answers1

2

In your angular.json file in your nativescript-NG project, add the following:

  "schematics": {
    "@schematics/angular:component": {
    "skipTests": true
  }
 },

Tested now. Hope it helps!

P.S: It works on anything, just replace component with what you need :)

TheCondorIV
  • 574
  • 2
  • 14
  • 34