question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Export utils from @schematics/angular

See original GitHub issue

From @alan-agius4 on March 16, 2018 17:12

Bug Report or Feature Request (mark with an x)

- [ ] bug report -> please search issues before submitting
- [X] feature request

Area

- [] devkit
- [x] schematics

Desired functionality

At the moment none of the @schematics/angular utils and actual schematics are exported available if one needs to create a custom schematic using an existing util, or build on top of an existing schematic.

  1. It would be nice that at least some utils are exported such as the ast utils, find-module etc… While I understand that these might not make sense to be in @angular-devkit/core, I think it will be good to export them and make them available. Either in the schematics package itself or create another package such as @angular-devkit/utils, @angular-devkit/ast-utils etc…

Another option would be to export them directly from the @schematics/angular package, using the main and typings field in package.json

I’ll happily do a PR if you let me know is the desired way.

Copied from original issue: angular/devkit#514

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Reactions:6
  • Comments:5

github_iconTop GitHub Comments

1reaction
Airbladercommented, Mar 13, 2019
0reactions
angular-automatic-lock-bot[bot]commented, Feb 14, 2021

This issue has been automatically locked due to inactivity. Please file a new issue if you are encountering a similar or related problem.

Read more about our automatic conversation locking policy.

This action has been performed automatically by a bot.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Speed up your Angular schematics development with useful ...
The following Angular CLI schematics util functions are based on the Angular CLI version ... function exported from @schematics/angular/utility/ast-utils .
Read more >
schematics-utilities
This project was created from that purpose - providing a collection of general and useful utilities for Schematics, based on non-exported existing utilities...
Read more >
Automatically Updating Angular Modules With Schematics ...
addExportToModule, Adds an export to the NgModule ... schematics-angular-utils/ast-utils'; import { InsertChange } from '.
Read more >
Angular Schematics - add library to NgModule imports
export function addImportStatement(tree: Tree, filePath: string, ... function from `@schematics/angular/utility/ast-utils' utils.
Read more >
Generating code using schematics - Angular
A schematic is a template-based code generator that supports complex logic. It is a set of instructions for transforming a software project by...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found