Skip to content

Instantly share code, notes, and snippets.

@vades
Last active May 21, 2019 06:08
Show Gist options
  • Save vades/3dbd3b621e3c31f3735910f5ee7662b9 to your computer and use it in GitHub Desktop.
Save vades/3dbd3b621e3c31f3735910f5ee7662b9 to your computer and use it in GitHub Desktop.
Generating things without .spec.ts in Angular

Generating things without .spec.ts in Angular

Disable generation using CLI by adding --no-spec

ng generate component component-name --no-spec

Permanently disable in angular.json

 "schematics": {
        "@schematics/angular:component": {
          "styleext": "scss",
          "spec": false
        },
        "@schematics/angular:class": {
          "spec": false
        },
        "@schematics/angular:directive": {
          "spec": false
        },
        "@schematics/angular:guard": {
          "spec": false
        },
        "@schematics/angular:module": {
          "spec": false
        },
        "@schematics/angular:pipe": {
          "spec": false
        },
        "@schematics/angular:service": {
          "spec": false
        }
      },
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment