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
0
votes
1 answer

Nested Angular add schematics

I have a project Child that has an add schematic. If Child becomes a dependency of a project Parent which also has an add schematic, how would ng-cli handle this? I don't see any references to ng add cascading or calling through to dependency…
Anthony
  • 7,638
  • 3
  • 38
  • 71
0
votes
1 answer

Angular schematics: apply rules to the current tree and then modify the tree

I'm creating an Angular schematics. I want to apply a rule to the current tree, and then modify the tree. as explained in the following snippet, I want to apply the rule created, so tree.exists("./file.txt") returns true export default…
Sh eldeeb
  • 1,589
  • 3
  • 18
  • 41
0
votes
1 answer

How to execute external Angular schematic and use its result in subsequent rules?

I would like to call Angular's ng-new schematic first, and then my Rule needs to operate on the results. so something like: chain([ externalSchematic('@schematics/angular', 'ng-new', options), …
user2297996
  • 1,382
  • 3
  • 18
  • 28
0
votes
0 answers

Run tslint --fix on a string not a file

I want to run tslint fix in a script on a string. I imagine something like this: import { fixer } from 'tslint' const stringToFormatAndFix = // some typescript file content const formatted = fixer(tslintJson,…
snd
  • 131
  • 1
  • 6
0
votes
1 answer

How to create angular schematic for repeating files?

There is one large project in which small applications are created. In each such application there are many identical index.html / tslint.json / app files I understand that through angular schematics this can be automated. I figured out how to…
Akotoff
  • 13
  • 1
  • 5
0
votes
1 answer

Angular schematics: is it possible to include a template file into another one

When creating custom schematics with @angular-devkit/schematics, is their a way to include a template file into another ? I can't find documentation about this feature. I can't even find the template engine used.
Stéphane
  • 1,528
  • 14
  • 21
0
votes
0 answers

Custom Component Schematic viewEncapsulation not defined

I'm trying to extend Angular's default component templates into customized ones we can use for our team. I've read through/followed a few tutorials, though none seem to do what I'm trying to accomplish. Anyway, I think I've gotten to a place where…
Logan Waite
  • 423
  • 5
  • 12
0
votes
1 answer

Angular schematics Tree: how to exclude?

I've got a Tree whose root is the project root dir. I would like to apply a rule using forEach, which iterates through all the files in the tree. This works, but it's very slow since node_modules is also part of the tree. How could I exclude that…
user2297996
  • 1,382
  • 3
  • 18
  • 28
0
votes
1 answer

Modules not loaded in while using Nativescript Schematics

I am trying to do code sharing between angular web and mobile app using NativeScript Schematics. Here is my code structure I have used [(ngModel)] in mobile specific HTML file and i have also imported NgFormsModule in my…
0
votes
1 answer

Angular Schematics, code to modify angular.json is not coming together

I've been using schematics to generate an standardized project. I've had a couple of issues, all of them related to modification of the angular.json file The following code is a sample of what I've tried, is executed within a function that does work…
RNMR
  • 76
  • 1
  • 8
0
votes
0 answers

Angular Schematics - How to create files dynamically?

I am working on Angular Schematics. I have created a project, where I am able to scaffold components, modules, services etc. But, whatever files are created by schematics has to be pre-existing. For example, If I wish to create a component, there…
Dheeraj Kumar
  • 3,917
  • 8
  • 43
  • 80
0
votes
2 answers

Collection "@candiman/website" cannot be resolved

I have checked Collection “@schematics/angular” cannot be resolved and it's not duplicate. I have created my own schematics and when I try to use it using ng add @candiman/website@0.0.5-beta.3 I am getting below errors. I think the problem is…
Aniruddha Das
  • 20,520
  • 23
  • 96
  • 132
0
votes
1 answer

Angular 7: generating @angular/material component give sass file with css syntax

after generating a new project with Angular CLI and choosing SASS: Which stylesheet format would you like to use? SASS [ http://sass-lang.com ] adding material with ng: ng add @angular/material and finally generating the nav-bar component of…
Arnaud Delubac
  • 759
  • 6
  • 13
0
votes
1 answer

Is it possible to create an in-memory tree from Create React App or Vue CLI?

I've created a schematic that it easy to test because Angular CLI is based on schematics. To create a tree of files that I can inspect, all I have to do is setup an appTree as follows: const schematicRunner = new SchematicTestRunner( …
Matt Raible
  • 8,187
  • 9
  • 61
  • 120
0
votes
1 answer

Error: Application entry point file not found

I used this link https://blog.angular.io/apps-that-work-natively-on-the-web-and-mobile-9b26852495e7 to create a new shared application and it showed site on browser correctly. But when I built apk and installed in mobile, its showing error…
user2349115
  • 1,288
  • 2
  • 17
  • 34
1 2 3
11
12