… using v2 ## Current Behavior <!-- This is the behavior we have today --> The `package.json` handling is split between before and after plugins so it's confusing. Also, `package.json` nodes will get overwritten by plugins while others won't. ## Expected Behavior <!-- This is the behavior we should expect with the changes in this PR --> The `package.json` handling is merged. Also, the `package.json` nodes will always overwrite plugins as intended. ## Related Issue(s) <!-- Please link the issue being fixed so it gets closed when this is merged. --> Fixes #
14 lines
399 B
TypeScript
14 lines
399 B
TypeScript
import type { NxPluginV2 } from '../src/project-graph/plugins';
|
|
import { workspaceRoot } from '../src/utils/workspace-root';
|
|
import { createNodeFromPackageJson } from '../src/plugins/package-json';
|
|
|
|
const plugin: NxPluginV2 = {
|
|
name: 'nx-all-package-jsons-plugin',
|
|
createNodes: [
|
|
'*/**/package.json',
|
|
(f) => createNodeFromPackageJson(f, workspaceRoot),
|
|
],
|
|
};
|
|
|
|
module.exports = plugin;
|