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
4 answers

Pass collection into custom angular schematic?

I want to create a custom angular schematic that can accept a collection of action names. I will then generate 3 ngrx actions for every action name provided from the user. for example I want to create a schematic that can be invoked like this: ng g…
cobolstinks
  • 6,801
  • 16
  • 68
  • 97
0
votes
0 answers

@angular/schematics: Typescript failing to compile

I am trying to create a custom schematics. I have created a template file which is to be generated by schematics. This should create file with classname specified by inputs at command. export class <%= classify(name) %> { } But when I run using…
Dheeraj Kumar
  • 3,917
  • 8
  • 43
  • 80
0
votes
1 answer

Creating new module using Angular schematics

We would like to use schematics to generate a feature module that contains components we are generating over and over. I've started following this tutorial: https://medium.com/@michael.warneke/merging-custom-angular-schematics-c14a303f63b6 But when…
doron
  • 1,508
  • 3
  • 18
  • 27
0
votes
2 answers

Custom Angular schematic doesn't generate new workspace

I have a custom Angular schematic (on an internal repo and NPM feed) that does not generate a new workspace and application when invoked from the command line. I attached a GIF that shows both the missing behavior when I run the custom schematic…
ericksoen
  • 821
  • 8
  • 14
0
votes
2 answers

Schematics works on schematic project but not in an angular project

I'm building my own custom schematics. And everything is working perfectly on my schematic project. But when I import the project in an angular project and try to generate a component I get an error. You can find the package on npm : "akasuaptics":…
Su4p
  • 865
  • 10
  • 24
0
votes
1 answer

Angular Schematics. Tree transforms not executing

I've been following the example for creating a custom angular schematic here: Creating your own application template for angular-cli And I've gotten it to work as expected on Mac. However, when I try to build from my schematic on a PC, I just get…
Scott B
  • 38,833
  • 65
  • 160
  • 266
0
votes
1 answer

Code-generation solution for Angular NgRx App

I am currently developing an angular-ngrx app. I am using angular-cli to scaffold the app. My trouble is as my app is growing larger i need to add lot of files eg reducer, action , state, effects files . I want to automate this part, where I could…
pankaj
  • 1,030
  • 5
  • 19
  • 41
0
votes
1 answer

angular-cli custom schematics -- modify environment.ts

I am in the process of developing custom schematics for our Angular Cli project. One of the requirements is to add properties/variables to the environment.prod.ts and environment.dev.ts files. I was wondering if any of you have done that and how…
-1
votes
0 answers

Unable to create custom schematic which creates react project and install few packages

Here is my code I am unable to run the schematic from below command. npx @angular-devkit/schematics-cli ./collection.json:create-opshub-schematic sample-app --file-path=C:\Users\fuss\Angular\new-app\src\app\app.component.ts And I am getting below…
-1
votes
1 answer

How to show 'Angualar Schematic...' entry in project popup menu?

I have an angular project where the Angular menu items are missing. In the settings it seems to be configured correctly: But in the pop-up menu (from the project-view) the entries are missing: Note: Some other projects work fine in the same…
TmTron
  • 17,012
  • 10
  • 94
  • 142
-1
votes
1 answer

Angular schematics: how to provide options from file?

I would like my schematics to look for a JSON file on startup. If this file exists, it should read the options (the ones defined in schema.json) from the file, suppressing all prompts. So if I start it like this and options.json doesn't exist: ng g…
user2297996
  • 1,382
  • 3
  • 18
  • 28
-1
votes
3 answers

What is the helper function for "lowercase" when writing an Angular schematic template?

I'm working on building a simple angular schematic template following a tutorial here. All going well. This tutorial uses a helper function (dasherize) to convert the file name from AwesomeWrap to hello-awesome-wrap. hello-__name@dasherize__ I…
Liam
  • 27,717
  • 28
  • 128
  • 190
-1
votes
2 answers

Angular schematics - file not installing

I am building an Angular custom schematics. I created the files directory and it looks like this: I am trying to add this component to the final app. my index file looks like this: function addSideNav(options: any) { return (host: Tree, context:…
Liraz Shaka Amir
  • 587
  • 9
  • 26
-2
votes
1 answer

Angular Schematics : create custom tree folders and files

I ve just strated to learn about Schematics , my first task is to generate a custom tree of folders and empty files using a custom shematic inside my Angular app for example : i want to generate this tree: folderOne |__ fileOne.ts folderTwo |__…
firasKoubaa
  • 6,439
  • 25
  • 79
  • 148
1 2 3
11
12