fix(core): generate npm preset correctly (#18164)
This commit is contained in:
parent
21bf6cd0a2
commit
36cd6b0485
@ -37,6 +37,17 @@ describe('create-nx-workspace --preset=npm', () => {
|
|||||||
cleanupProject({ skipReset: true });
|
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', () => {
|
it('should add angular application', () => {
|
||||||
packageInstall('@nx/angular', wsName);
|
packageInstall('@nx/angular', wsName);
|
||||||
const appName = uniq('my-app');
|
const appName = uniq('my-app');
|
||||||
|
|||||||
@ -412,7 +412,6 @@ async function determineNoneOptions(
|
|||||||
} else {
|
} else {
|
||||||
preset = Preset.NPM;
|
preset = Preset.NPM;
|
||||||
}
|
}
|
||||||
preset = workspaceType === 'standalone' ? Preset.TsStandalone : Preset.TS;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if (parsedArgs.js !== undefined) {
|
if (parsedArgs.js !== undefined) {
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user