From b8e7e061f7adb1d92023ed3be36efbfc6a22a144 Mon Sep 17 00:00:00 2001 From: Victor Savkin Date: Sun, 13 May 2018 14:36:20 -0400 Subject: [PATCH] fix(schematics): update link to nx logo --- packages/schematics/src/collection/application/index.ts | 2 +- packages/schematics/src/collection/library/index.ts | 8 +++++++- .../collection/ng-new/files/__directory__/package.json | 2 +- 3 files changed, 9 insertions(+), 3 deletions(-) diff --git a/packages/schematics/src/collection/application/index.ts b/packages/schematics/src/collection/application/index.ts index 16d6a37aa565d..0161325cb29ad 100644 --- a/packages/schematics/src/collection/application/index.ts +++ b/packages/schematics/src/collection/application/index.ts @@ -97,7 +97,7 @@ function addRouterRootConfiguration(options: NormalizedSchema): Rule { const staticComponentContent = `

Welcome to app!

- +

This is an Angular CLI app built with Nrwl Nx!

diff --git a/packages/schematics/src/collection/library/index.ts b/packages/schematics/src/collection/library/index.ts index c52306a73d5d9..af843094a3abd 100644 --- a/packages/schematics/src/collection/library/index.ts +++ b/packages/schematics/src/collection/library/index.ts @@ -109,6 +109,10 @@ function addLoadChildren(options: NormalizedSchema): Rule { return (host: Tree) => { const npmScope = getNpmScope(host); + if (! host.exists(options.parentModule)) { + throw new Error(`Cannot find '${options.parentModule}'`); + } + const moduleSource = host.read(options.parentModule)!.toString('utf-8'); const sourceFile = ts.createSourceFile( options.parentModule, @@ -172,7 +176,9 @@ function findClosestTsConfigApp( function addChildren(options: NormalizedSchema): Rule { return (host: Tree) => { const npmScope = getNpmScope(host); - + if (! host.exists(options.parentModule)) { + throw new Error(`Cannot find '${options.parentModule}'`); + } const moduleSource = host.read(options.parentModule)!.toString('utf-8'); const sourceFile = ts.createSourceFile( options.parentModule, diff --git a/packages/schematics/src/collection/ng-new/files/__directory__/package.json b/packages/schematics/src/collection/ng-new/files/__directory__/package.json index 3b1d5616c5902..d2dc247e4110a 100755 --- a/packages/schematics/src/collection/ng-new/files/__directory__/package.json +++ b/packages/schematics/src/collection/ng-new/files/__directory__/package.json @@ -22,7 +22,6 @@ "update:skip": "./node_modules/.bin/nx update:skip", "workspace-schematic": "./node_modules/.bin/nx workspace-schematic", "dep-graph": "./node_modules/.bin/nx dep-graph", - "postinstall": "echo 1", "help": "./node_modules/.bin/nx help" }, "private": true, @@ -50,6 +49,7 @@ "@angular/cli": "<%= angularCliVersion %>", "@angular/compiler-cli": "<%= angularVersion %>", "@angular/language-service": "<%= angularVersion %>", + "@angular-devkit/build-angular": "~0.6.1", "@ngrx/schematics": "<%= ngrxSchematicsVersion %>", "@nrwl/schematics": "<%= schematicsVersion %>", "jasmine-marbles": "<%= jasmineMarblesVersion %>",