Skip to content

Commit 349bb9a

Browse files
committed
fixup! fixup! feat(workspace-plugin): implement workspace inferred plugin
1 parent 017498d commit 349bb9a

File tree

1 file changed

+16
-15
lines changed

1 file changed

+16
-15
lines changed

tools/workspace-plugin/src/plugins/workspace-plugin.ts

+16-15
Original file line numberDiff line numberDiff line change
@@ -1,24 +1,25 @@
11
/* eslint-disable @typescript-eslint/no-shadow */
2-
import { join } from 'node:path';
2+
3+
import { dirname, join } from 'node:path';
4+
import { existsSync } from 'node:fs';
35
import {
4-
CreateNodesContextV2,
5-
CreateNodesResult,
6-
CreateNodesV2,
7-
ProjectConfiguration,
8-
TargetConfiguration,
6+
type CreateNodesContextV2,
7+
type CreateNodesResult,
8+
type CreateNodesV2,
9+
type ProjectConfiguration,
10+
type TargetConfiguration,
911
createNodesFromFiles,
1012
getPackageManagerCommand,
1113
readJsonFile,
1214
} from '@nx/devkit';
13-
import { dirname } from 'node:path';
14-
import { existsSync } from 'node:fs';
15+
16+
import { type PackageJson } from '../types';
17+
import { type BuildExecutorSchema } from '../executors/build/schema';
1518

1619
import { assertProjectExists, projectConfigGlob } from './shared';
1720
import { buildCleanTarget } from './clean-plugin';
1821
import { buildFormatTarget } from './format-plugin';
1922
import { buildTypeCheckTarget } from './type-check-plugin';
20-
import { PackageJson } from '../types';
21-
import { type BuildExecutorSchema } from '../executors/build/schema';
2223

2324
interface WorkspacePluginOptions {
2425
// targetName?: string;
@@ -235,13 +236,13 @@ function buildVerifyPackagingTarget(
235236
context: CreateNodesContextV2,
236237
config: TaskBuilderConfig,
237238
): TargetConfiguration | null {
238-
if (config.tags.includes('verify-packaging') && !config.packageJSON.private) {
239-
return {
240-
executor: '@fluentui/workspace-plugin:verify-packaging',
241-
};
239+
if (config.packageJSON.private) {
240+
return null;
242241
}
243242

244-
return null;
243+
return {
244+
executor: '@fluentui/workspace-plugin:verify-packaging',
245+
};
245246
}
246247

247248
function buildBundleSizeTarget(

0 commit comments

Comments
 (0)