Skip to content

Commit

Permalink
fixup! feat(angular): improve incremental build speed
Browse files Browse the repository at this point in the history
  • Loading branch information
juristr committed Oct 29, 2020
1 parent 5b514c3 commit 051bc88
Show file tree
Hide file tree
Showing 11 changed files with 15 additions and 14 deletions.
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# lib-build
# ng-packagr-lite

Build an Angular library
Build an Angular library for incremental building

Builder properties can be configured in angular.json when defining the builder, or when invoking it.

Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# lib-build
# ng-packagr-lite

Build an Angular library
Build an Angular library for incremental building

Builder properties can be configured in workspace.json when defining the builder, or when invoking it.
Read more about how to use builders and the CLI here: https://nx.dev/node/guides/cli.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# lib-build
# ng-packagr-lite

Build an Angular library
Build an Angular library for incremental building

Builder properties can be configured in workspace.json when defining the builder, or when invoking it.
Read more about how to use builders and the CLI here: https://nx.dev/react/guides/cli.
Expand Down
8 changes: 4 additions & 4 deletions packages/angular/builders.json
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
{
"$schema": "@angular-devkit/architect/src/builders-schema.json",
"builders": {
"lib-build": {
"implementation": "./src/builders/lib-build/lib-build.impl",
"schema": "./src/builders/lib-build/schema.json",
"description": "Build an Angular library"
"ng-packagr-lite": {
"implementation": "./src/builders/ng-packagr-lite/ng-packagr-lite.impl",
"schema": "./src/builders/ng-packagr-lite/schema.json",
"description": "Build an Angular library for incremental building"
},
"package": {
"implementation": "./src/builders/package/package.impl",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,13 +11,13 @@ import {
NX_PACKAGE_TRANSFORM,
} from './ng-packagr-adjustments/package.di';
import { NgPackagr } from 'ng-packagr';
import { NX_ENTRY_POINT_PROVIDERS } from '@nrwl/angular/src/builders/lib-build/ng-packagr-adjustments/entry-point.di';
import { NX_ENTRY_POINT_PROVIDERS } from './ng-packagr-adjustments/entry-point.di';
import {
BuildAngularLibraryBuilderOptions,
createLibraryBuilder,
} from '../package/package.impl';

async function initializeNgPackagr(
async function initializeNgPackgrLite(
options: BuildAngularLibraryBuilderOptions & JsonObject,
context: BuilderContext,
projectDependencies: DependentBuildableProjectNode[]
Expand All @@ -43,5 +43,5 @@ async function initializeNgPackagr(
}

export default createBuilder<Record<string, string> & any>(
createLibraryBuilder(initializeNgPackagr)
createLibraryBuilder(initializeNgPackgrLite)
);
Original file line number Diff line number Diff line change
Expand Up @@ -148,7 +148,8 @@ export function updateProject(options: NormalizedSchema): Rule {
fixedProject.architect.build.builder = '@nrwl/angular:package';
} else {
// adjust the builder path to our custom one
fixedProject.architect.build.builder = '@nrwl/angular:lib-build';
fixedProject.architect.build.builder =
'@nrwl/angular:ng-packagr-lite';
}
}

Expand Down

0 comments on commit 051bc88

Please sign in to comment.