Skip to content

fix: lookup default stylesheet extension from angular.json file #315

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

Merged
merged 4 commits into from
Apr 22, 2021

Conversation

agonper
Copy link
Contributor

@agonper agonper commented Apr 22, 2021

PR Checklist

What is the current behavior?

  1. ng generate component was not taking into account the style extension configured in angular.json file
  2. TypeScript version should be 4.1 instead of 4.0 to work with @schematics/angular@11.2
  3. Migration to @schematics/angular@11.2 was partially done at angular-project-parser.ts file due to hidden any type errors.

What is the new behavior?

With this angular.json file:

{
  "$schema": "./node_modules/@angular/cli/lib/config/schema.json",
  "version": 1,
  "newProjectRoot": "projects",
  "cli": {
    "defaultCollection": "@nativescript/schematics"
  },
  "projects": {
    "app": {
      "root": "",
      "sourceRoot": "src",
      "projectType": "application",
      "prefix": "Sym",
      "schematics": {
        "@schematics/angular:component": {
          "style": "scss"
        }
      }
    }
  },
  "defaultProject": "app"
}

In a NS project with TS 4.1.5, NS 7.3, and NG 11.2, it produces the following output:
image

I think I fixed other things along the way, e.g. tests are no longer "hanging" now.

Fixes/Implements/Closes regression induced in 3ff5fa7.

BREAKING CHANGES:
None, the API remains the same

Migration steps:
TypeScript v4.1.x should be installed

@cla-bot cla-bot bot added the cla: yes label Apr 22, 2021
@NathanWalker NathanWalker merged commit eb2931a into NativeScript:master Apr 22, 2021
@agonper agonper deleted the fix-def-style-ext branch April 23, 2021 07:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants