Skip to content

Commit

Permalink
fix(core): rearrange the core and npm presets to avoid breaking exist…
Browse files Browse the repository at this point in the history
…ing workspaces
  • Loading branch information
vsavkin committed Jun 13, 2022
1 parent 550b185 commit fbc14d6
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 11 deletions.
10 changes: 1 addition & 9 deletions packages/nx/presets/core.json
@@ -1,10 +1,6 @@
{
"implicitDependencies": {
"package.json": {
"dependencies": "*",
"devDependencies": "*"
},
".eslintrc.json": "*"
"package.json": "*"
},
"tasksRunnerOptions": {
"default": {
Expand All @@ -14,10 +10,6 @@
}
}
},
"workspaceLayout": {
"libsDir": "packages",
"appsDir": "packages"
},
"pluginsConfig": {
"@nrwl/js": {
"analyzeSourceFiles": false
Expand Down
4 changes: 4 additions & 0 deletions packages/nx/presets/npm.json
Expand Up @@ -10,6 +10,10 @@
}
}
},
"workspaceLayout": {
"libsDir": "packages",
"appsDir": "packages"
},
"pluginsConfig": {
"@nrwl/js": {
"analyzeSourceFiles": false
Expand Down
2 changes: 1 addition & 1 deletion packages/nx/src/command-line/init.ts
Expand Up @@ -29,7 +29,7 @@ export function initHandler() {
if (!fileExists('nx.json')) {
writeJsonFile(
'nx.json',
readJsonFile(join(__dirname, '..', '..', 'presets', 'npm.json'))
readJsonFile(join(__dirname, '..', '..', 'presets', 'core.json'))
);

output.success({
Expand Down
4 changes: 3 additions & 1 deletion packages/nx/src/config/workspaces.ts
Expand Up @@ -197,7 +197,9 @@ export class Workspaces {
}
} else {
try {
return readJsonFile(join(__dirname, '..', '..', 'presets', 'npm.json'));
return readJsonFile(
join(__dirname, '..', '..', 'presets', 'core.json')
);
} catch (e) {
return {};
}
Expand Down

1 comment on commit fbc14d6

@vercel
Copy link

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

Please sign in to comment.