fix(core): rearrange the core and npm presets to avoid breaking existing workspaces

This commit is contained in:
Victor Savkin 2022-06-13 10:05:22 -04:00
parent 550b185921
commit fbc14d6544
No known key found for this signature in database
GPG Key ID: 39178FEB7698B817
4 changed files with 9 additions and 11 deletions

View File

@ -1,10 +1,6 @@
{
"implicitDependencies": {
"package.json": {
"dependencies": "*",
"devDependencies": "*"
},
".eslintrc.json": "*"
"package.json": "*"
},
"tasksRunnerOptions": {
"default": {
@ -14,10 +10,6 @@
}
}
},
"workspaceLayout": {
"libsDir": "packages",
"appsDir": "packages"
},
"pluginsConfig": {
"@nrwl/js": {
"analyzeSourceFiles": false

View File

@ -10,6 +10,10 @@
}
}
},
"workspaceLayout": {
"libsDir": "packages",
"appsDir": "packages"
},
"pluginsConfig": {
"@nrwl/js": {
"analyzeSourceFiles": false

View File

@ -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({

View File

@ -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 {};
}