Skip to content

Commit

Permalink
fix(js): preset should use packages folder (#10691)
Browse files Browse the repository at this point in the history
  • Loading branch information
AgentEnder committed Jun 10, 2022
1 parent 66846f7 commit 6132ad7
Showing 1 changed file with 8 additions and 5 deletions.
13 changes: 8 additions & 5 deletions packages/workspace/src/generators/preset/preset.ts
Expand Up @@ -33,11 +33,7 @@ export const presetSchematic = convertNxGenerator(presetGenerator);
export default presetGenerator;

async function createPreset(tree: Tree, options: Schema) {
if (
options.preset === Preset.Empty ||
options.preset === Preset.Apps ||
options.preset === Preset.TS
) {
if (options.preset === Preset.Empty || options.preset === Preset.Apps) {
return;
} else if (options.preset === Preset.Angular) {
const {
Expand Down Expand Up @@ -178,6 +174,13 @@ async function createPreset(tree: Tree, options: Schema) {
if (options.preset === Preset.Core) {
tree.delete('workspace.json');
}
} else if (options.preset === Preset.TS) {
const c = readWorkspaceConfiguration(tree);
c.workspaceLayout = {
appsDir: 'packages',
libsDir: 'packages',
};
updateWorkspaceConfiguration(tree, c);
} else {
throw new Error(`Invalid preset ${options.preset}`);
}
Expand Down

1 comment on commit 6132ad7

@vercel
Copy link

@vercel vercel bot commented on 6132ad7 Jun 10, 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-five.vercel.app
nx-dev-git-master-nrwl.vercel.app
nx.dev

Please sign in to comment.