-
Notifications
You must be signed in to change notification settings - Fork 2.4k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(core): support adding plugins to non-js nx installations
1 parent
45673b2
commit 2d7591b
Showing
6 changed files
with
142 additions
and
37 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,13 +1,6 @@ | ||
import { | ||
getNxWrapperContents, | ||
nxWrapperPath, | ||
} from '../../command-line/init/implementation/dot-nx/add-nx-scripts'; | ||
import { normalizePath } from '../../utils/path'; | ||
import { Tree } from '../../generators/tree'; | ||
import { updateNxw } from '../../utils/update-nxw'; | ||
|
||
export default async function (tree: Tree) { | ||
const wrapperPath = normalizePath(nxWrapperPath()); | ||
if (tree.exists(wrapperPath)) { | ||
tree.write(wrapperPath, getNxWrapperContents()); | ||
} | ||
updateNxw(tree); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
import type { Tree } from '../../generators/tree'; | ||
import { updateNxw } from '../../utils/update-nxw'; | ||
|
||
export default async function (tree: Tree) { | ||
updateNxw(tree); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
import { | ||
getNxWrapperContents, | ||
nxWrapperPath, | ||
} from '../command-line/init/implementation/dot-nx/add-nx-scripts'; | ||
import type { Tree } from '../generators/tree'; | ||
import { normalizePath } from '../utils/path'; | ||
|
||
export function updateNxw(tree: Tree) { | ||
const wrapperPath = normalizePath(nxWrapperPath()); | ||
if (tree.exists(wrapperPath)) { | ||
tree.write(wrapperPath, getNxWrapperContents()); | ||
} | ||
} |