Questions tagged [angular-schematics]

Schematics is a workflow tool for the modern web; it can apply transforms to your project, such as create a new component, or updating your code to fix breaking changes in a dependency. Or maybe you want to add a new configuration option or framework to an existing project. Angular schematics are part of angular-cli and are used to generate components, modules, pipes, etc.

179 questions
1
vote
1 answer

Is it possible to execute shell commands from within an Angular Schematic?

I have in mind a custom schematic that I will use in coordination with "ng serve" that would automatically launch a helper microservice written in Node at the same time. Is this possible to do within a schematic, or do I need to launch it manually…
1
vote
1 answer

Creating a new Angular 8 project doesn't give me options

I'm creating a new Angular 8 project and I was trying to set the style sheets to SCSS and create angular routing from the beginning of the project. I know I can do it manually, but it was pretty nice to have the menu of options in the command line.…
Patricio Vargas
  • 5,236
  • 11
  • 49
  • 100
1
vote
0 answers

Angular Schematics, how to use own schematic

I can't find how to use a newly created schematics. Here is my structure : |- tools/ |- schematics |- my-first-schematic |- my-second-schematic I want to use my-first-schematic within my-second-schematic. I know about externalSchematic()…
KevinTale
  • 1,658
  • 3
  • 25
  • 47
1
vote
1 answer

NX Schematics, how to call own schematic

I can't find how to use a newly created schematics with NX using ng g workspace-schematic Here is my structure : |- tools/ |- schematics |- my-first-schematic |- my-second-schematic I want to use my-first-schematic within…
KevinTale
  • 1,658
  • 3
  • 25
  • 47
1
vote
2 answers

Angular Schematics confusion

Not sure to fully understand a concept with Angular Schematics. More precisly how to execute a schematic. Reading from some articles, I saw that we have to use ng g my-schematics-collection:simple-schematic --name="some name". In other articles I…
KevinTale
  • 1,658
  • 3
  • 25
  • 47
1
vote
1 answer

Why is there different behavior when linking to a schematic vs installing one?

I have an Angular Schematic that works differently when I install it versus when I link to it on my hard drive. Steps to reproduce: Create a new Angular app with Angular CLI: ng new --routing --style css Add my schematic and run it: npm install…
Matt Raible
  • 8,187
  • 9
  • 61
  • 120
1
vote
0 answers

Angular schematics append barrel file

I am creating some angular schematics for my project to create all required services/components with all imports etc. The problem is that I use index file to import all services etc and my structure might look like this: | src | |-- app | …
Chaki
  • 73
  • 6
1
vote
1 answer

Composing build schematics in angular

I'd like to compose the ngpackagr schematic with my own. Inside my custom rule I do something like: export function testScehma(_options: any): Rule { return chain([ externalSchematic('@angular-devkit/build-ng-packagr', 'build', _options), …
yccteam
  • 2,168
  • 4
  • 25
  • 47
1
vote
0 answers

Angular - Can I have custom HTML Structure whenever I create a component?

Currently, I am working on an Angular project where I have so many pages having similar HTML structure. I have a fixed HTML Structure and what all I need is, whenever I create a component, component.html file should contain my fixed HTML structure…
1
vote
1 answer

Init my Angular 6 project fails : schematics does not works

I'm trying to create a new angular project and add the @angular/material schematics. But it fails with this error : Installed packages for tooling via npm. Your project is not using the default configuration for build and test. The Angular Material…
jeremieca
  • 1,156
  • 2
  • 13
  • 38
1
vote
1 answer

Including shared styling within NativeScript app using angular.json stylePreprocessor

I'm attempting to use the Angular 6's stylePreprocessorOptions so I can simply @import 'app' to import branding/other shared stylings into a component. My nativescript project exists within a NxWorkspace setup, which itself contains an…
1
vote
1 answer

When trying to create navside bar getting a schematic error in angular

Below error is thrown while trying to run ng generate @angular/material-nav --name=main-nav command in angular 6. Can anyone please help me to sort out this> Error: Schematic "@angular/material-nav" not found in collection …
1
vote
1 answer

Angular 5 Schematics Templating

So, recently my team started to try out the new schematics that comes with the latest angular-cli and decided to construct some of our own. So far it's been going smooth but now we are at a crossroad where we have no idea of where to go. We have a…
Letterix
  • 45
  • 5
0
votes
0 answers

How to customize schematics schema.json?

Is it possible to customise Angular schematics schema.json? I wanna add extra properties to the schema. In other words, I would like top extend the schematics schema.json syntax. How to do that? { "$schema": "http://json-schema.org/schema", …
user2297996
  • 1,382
  • 3
  • 18
  • 28
0
votes
2 answers

How to use Angular Schematics not published but in project direclty

I want to create an Angular Schematics to create some components and make it easier to develop my application. The problem is that i don't want to publish it, i want to use it "as it is" in my project. Basically my project have this structure : -…
A G
  • 86
  • 11