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

feat(generators): add angularJson option to app.nest #98

Merged
merged 1 commit into from
Mar 17, 2019
Merged

feat(generators): add angularJson option to app.nest #98

merged 1 commit into from
Mar 17, 2019

Conversation

dungahk
Copy link
Contributor

@dungahk dungahk commented Mar 17, 2019

Description

Add the project to angular.json along with a couple of targets.

Tech debt

It still misses the test target

Related issues

close #94

Logic behind

I would like to use this function (https://github.com/nrwl/nx/blob/master/packages/schematics/src/collection/node-application/index.ts#L155) but it is not exported, so what I created a temp Tree and used it to run the node-app schematic from Nx and get the angular.json project object generated.

i.e:
``

{
"nest-api": {
      "root": "apps/nest-api",
      "sourceRoot": "apps/nest-api/src",
      "projectType": "application",
      "prefix": "nest-api",
      "schematics": {},
      "architect": {
        "build": {
          "builder": "@nrwl/builders:node-build",
          "options": {
            "outputPath": "dist/apps/nest-api",
            "main": "apps/nest-api/src/main.ts",
            "tsConfig": "apps/nest-api/tsconfig.app.json"
          },
          "configurations": {
            "production": {
              "optimization": true,
              "extractLicenses": true,
              "inspect": false,
              "fileReplacements": [
                {
                  "replace": "apps/nest-api/src/environments/environment.ts",
                  "with": "apps/nest-api/src/environments/environment.prod.ts"
                }
              ],
              "externalDependencies": "none"
            }
          }
        },
        "serve": {
          "builder": "@nrwl/builders:node-execute",
          "options": {
            "buildTarget": "nest-api:build"
          }
        },
        "lint": {
          "builder": "@angular-devkit/build-angular:tslint",
          "options": {
            "tsConfig": [
              "apps/nest-api/tsconfig.app.json"
            ],
            "exclude": [
              "**/node_modules/**"
            ]
          }
        }
      }
    }
}

Add the project to angular.json along with a couple of targets.
It still misses the test target
close #94
@NathanWalker
Copy link
Member

Nice work @dungahk 👍

@NathanWalker NathanWalker merged commit adec8fb into nstudio:master Mar 17, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Nest application does not update the angular.json file
2 participants