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

fix(angular): export generators correctly #12434 #12460

Merged
merged 1 commit into from Oct 7, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
@@ -1,7 +1,11 @@
import { joinPathFragments, logger, Tree } from '@nrwl/devkit';
import {
formatFiles,
joinPathFragments,
logger,
readProjectConfiguration,
Tree,
} from '@nrwl/devkit';
import type { Schema } from './schema';

import { readProjectConfiguration, formatFiles } from '@nrwl/devkit';
import { getMFProjects } from '../../utils/get-mf-projects';
import {
checkOutputNameMatchesProjectName,
Expand All @@ -12,7 +16,7 @@ import {
writeNewWebpackConfig,
} from './lib';

export default async function convertToWithMF(tree: Tree, schema: Schema) {
export async function convertToWithMF(tree: Tree, schema: Schema) {
const projects = new Set(getMFProjects(tree, { legacy: true }));

if (!projects.has(schema.project)) {
Expand Down Expand Up @@ -56,3 +60,5 @@ export default async function convertToWithMF(tree: Tree, schema: Schema) {

await formatFiles(tree);
}

export default convertToWithMF;
4 changes: 3 additions & 1 deletion packages/angular/src/generators/host/host.ts
Expand Up @@ -16,7 +16,7 @@ import { addRoute } from '../../utils/nx-devkit/route-utils';
import { setupMf } from '../setup-mf/setup-mf';
import { E2eTestRunner } from '../../utils/test-runners';

export default async function host(tree: Tree, options: Schema) {
export async function host(tree: Tree, options: Schema) {
const projects = getProjects(tree);

const remotesToGenerate: string[] = [];
Expand Down Expand Up @@ -142,3 +142,5 @@ ${remoteRoutes}
}
);
}

export default host;
4 changes: 3 additions & 1 deletion packages/angular/src/generators/remote/remote.ts
Expand Up @@ -28,7 +28,7 @@ function findNextAvailablePort(tree: Tree) {
return nextAvailablePort;
}

export default async function remote(tree: Tree, options: Schema) {
export async function remote(tree: Tree, options: Schema) {
const projects = getProjects(tree);
if (options.host && !projects.has(options.host)) {
throw new Error(
Expand Down Expand Up @@ -152,3 +152,5 @@ export class AppModule {}`
tree.write(pathToIndexHtml, newIndexContents);
}
}

export default remote;