Skip to content

Commit

Permalink
fix(core): fix nx init for non monorepos
Browse files Browse the repository at this point in the history
  • Loading branch information
vsavkin committed Nov 30, 2022
1 parent 5d0f50e commit 7762edd
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion e2e/nx-init/src/nx-init.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ describe('nx init', () => {
expect(runCLI('run package:echo')).toContain('123');
});

it('should work in a regular npm repo ttt', () => {
it('should work in a regular npm repo', () => {
createNonNxProjectDirectory('regular-repo', false);
updateFile(
'package.json',
Expand Down
2 changes: 1 addition & 1 deletion packages/nx/src/nx-init/add-nx-to-npm-repo.ts
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,7 @@ export function markRootPackageJsonAsNxProject(
scriptOutputs: { [script: string]: string }
) {
const json = readJsonFile(joinPathFragments(repoRoot, `package.json`));
json.nx.targets = {};
json.nx = { targets: {} };
for (let script of Object.keys(scriptOutputs)) {
if (scriptOutputs[script]) {
json.nx.targets[script] = {
Expand Down

1 comment on commit 7762edd

@vercel
Copy link

@vercel vercel bot commented on 7762edd Nov 30, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Successfully deployed to the following URLs:

nx-dev – ./

nx-dev-nrwl.vercel.app
nx.dev
nx-dev-git-master-nrwl.vercel.app
nx-five.vercel.app

Please sign in to comment.