Skip to content

Commit

Permalink
feat(core): ensure @nx/js plugin is installed for all JS workspaces
Browse files Browse the repository at this point in the history
  • Loading branch information
jaysoo committed Aug 30, 2023
1 parent b74f367 commit 16af98e
Showing 1 changed file with 3 additions and 6 deletions.
9 changes: 3 additions & 6 deletions packages/workspace/src/generators/new/generate-preset.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,12 +16,7 @@ import * as yargsParser from 'yargs-parser';
import { spawn, SpawnOptions } from 'child_process';

export function addPresetDependencies(host: Tree, options: NormalizedSchema) {
if (
options.preset === Preset.Apps ||
options.preset === Preset.Core ||
options.preset === Preset.Empty ||
options.preset === Preset.NPM
) {
if (options.preset === Preset.Core || options.preset === Preset.Empty) {
return;
}
const { dependencies, dev } = getPresetDependencies(options);
Expand Down Expand Up @@ -98,6 +93,8 @@ function getPresetDependencies({
e2eTestRunner,
}: NormalizedSchema) {
switch (preset) {
case Preset.Apps:
case Preset.NPM:
case Preset.TS:
case Preset.TsStandalone:
return { dependencies: {}, dev: { '@nx/js': nxVersion } };
Expand Down

0 comments on commit 16af98e

Please sign in to comment.