Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

schematic(theme): migrate project from prebuilt to custom theme #16416

Open
Splaktar opened this issue Jul 1, 2019 · 1 comment
Open

schematic(theme): migrate project from prebuilt to custom theme #16416

Splaktar opened this issue Jul 1, 2019 · 1 comment
Labels
area: ng-generate Schematics that generate code in user projects feature This issue represents a new feature or feature request rather than a bug or bug fix P4 A relatively minor issue that is not relevant to core functions
Projects

Comments

@Splaktar
Copy link
Member

Splaktar commented Jul 1, 2019

Feature Description

This actually came in through the Angular CLI feedback survey, but there is interest in having a ng generate schematic for migrating an app using a prebuilt theme to the custom theme configuration that ng add already supports.

Use Case

Many times at ng add time, users don't know why they would need a custom theme or don't know that they will need one. There are a number of gotchas and ways to get implementing a custom theme wrong. Having a schematic for this would help streamline that experience and fits well without our goals for Angular Material schematics.

It's likely that a good deal of our existing ng add logic for adding a custom theme could be re-used. It looks like the ng add logic already handles things like adding a custom theme to a project that only uses CSS (it adds a custom-theme.scss file and then adds that to the styles array in the angular.json).

There may be a need to allow the caller to point to the files where they import their prebuilt theme, as they may have moved it out of src/styles.scss. But maybe it's possible to walk the imports to find it?

Proposal

ng g @angular/material:customTheme

@Splaktar Splaktar added the feature This issue represents a new feature or feature request rather than a bug or bug fix label Jul 1, 2019
@mmalerba mmalerba added the needs triage This issue needs to be triaged by the team label May 20, 2020
@devversion devversion added area: ng-generate Schematics that generate code in user projects P4 A relatively minor issue that is not relevant to core functions and removed needs triage This issue needs to be triaged by the team labels May 28, 2020
@devversion devversion added this to Triaged in triage #1 via automation May 28, 2020
@devversion
Copy link
Member

That is definitely a great idea. It would be great if we could spend some time on these things.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area: ng-generate Schematics that generate code in user projects feature This issue represents a new feature or feature request rather than a bug or bug fix P4 A relatively minor issue that is not relevant to core functions
Projects
No open projects
triage #1
  
Triaged
Development

No branches or pull requests

3 participants