Skip to content
This repository has been archived by the owner on Oct 14, 2022. It is now read-only.

Commit

Permalink
feat(@architect/udk): support angular devkit v0.1102.7 and nx v11.5.2
Browse files Browse the repository at this point in the history
  • Loading branch information
enten committed Apr 6, 2021
1 parent 075d5fc commit 920301f
Show file tree
Hide file tree
Showing 9 changed files with 5,158 additions and 1,617 deletions.
2 changes: 2 additions & 0 deletions angular/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,8 @@ Build an universal angular application.
| `fileReplacements` | | | Replace files with other files in browser and server. |
| `deleteOutputPath` | boolean | false | Delete the output path before building. |
| `verbose` | boolean | false | Adds more details to output logging. |
| `outputPath` | string | | The full path for the output directory (relative to the current workspace) expected of browser and server targets. Use it to warn when browser or server target output path is outside this output path. Use it to allow nx (@nrwl/workspace) to cache udk build. Don't use it in case of browser and server targets hasn't the same base output path. |
| `generatePackageJson` | boolean | false | Generates a package.json file inside 'outputPath' with a main field to server output main.js. |

### udk:udk-runner

Expand Down
11 changes: 9 additions & 2 deletions angular/lib/build/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ import {
createServerBuilderFinalizer,
createUniversalWebpackConfig,
createWebpackMultiCompiler,
generatePackageJson,
getUniversalTargetOptions,
initializeBrowserBuilder,
initializeServerBuilder,
Expand All @@ -40,12 +41,16 @@ export async function ngUniversalBuild(

if (options.bundleDependenciesWhitelist?.length) {
// tslint:disable-next-line: max-line-length
context.logger.warn(`Option "bundleDependenciesWhitelist" is deprecated: use "externalDependencies" in server builder`);
context.logger.warn(`Warning: Option "bundleDependenciesWhitelist" is deprecated: use "externalDependencies" in server builder`);
}

if (options.fileLoaderEmitFile) {
// tslint:disable-next-line: max-line-length
context.logger.warn(`Option "fileLoaderEmitFile" is deprecated: server builder doesn't emit any file since angular v9`);
context.logger.warn(`Warning: Option "fileLoaderEmitFile" is deprecated: server builder doesn't emit any file since angular v9`);
}

if (options.generatePackageJson && !options.outputPath) {
context.logger.warn(`Warning: Option "generatePackageJson" requires option "outputPath"`);
}

context.reportStatus(`Executing...`);
Expand Down Expand Up @@ -119,6 +124,8 @@ export async function ngUniversalBuild(
emittedFiles: serverEmittedFiles,
} as BuildResult);

generatePackageJson(context, options, serverOptions);

context.reportStatus(`Done.`);

return {
Expand Down
Loading

0 comments on commit 920301f

Please sign in to comment.