Skip to content

Commit

Permalink
fix(core): generate npm preset correctly (#18164)
Browse files Browse the repository at this point in the history
  • Loading branch information
jaysoo authored Jul 18, 2023
1 parent 21bf6cd commit 36cd6b0
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 1 deletion.
11 changes: 11 additions & 0 deletions e2e/workspace-create-npm/src/create-nx-workspace-npm.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,17 @@ describe('create-nx-workspace --preset=npm', () => {
cleanupProject({ skipReset: true });
});

it('should setup package-based workspace', () => {
const packageJson = readJson('package.json');
expect(packageJson.dependencies).toEqual({});

if (getSelectedPackageManager() === 'pnpm') {
checkFilesExist('pnpm-workspace.yaml');
} else {
expect(packageJson.workspaces).toEqual(['packages/*']);
}
});

it('should add angular application', () => {
packageInstall('@nx/angular', wsName);
const appName = uniq('my-app');
Expand Down
1 change: 0 additions & 1 deletion packages/create-nx-workspace/bin/create-nx-workspace.ts
Original file line number Diff line number Diff line change
Expand Up @@ -412,7 +412,6 @@ async function determineNoneOptions(
} else {
preset = Preset.NPM;
}
preset = workspaceType === 'standalone' ? Preset.TsStandalone : Preset.TS;
}

if (parsedArgs.js !== undefined) {
Expand Down

1 comment on commit 36cd6b0

@vercel
Copy link

@vercel vercel bot commented on 36cd6b0 Jul 18, 2023

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-five.vercel.app
nx-dev-git-master-nrwl.vercel.app
nx.dev
nx-dev-nrwl.vercel.app

Please sign in to comment.