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": { "implicitDependencies": {
"package.json": { "package.json": "*"
"dependencies": "*",
"devDependencies": "*"
},
".eslintrc.json": "*"
}, },
"tasksRunnerOptions": { "tasksRunnerOptions": {
"default": { "default": {
@ -14,10 +10,6 @@
} }
} }
}, },
"workspaceLayout": {
"libsDir": "packages",
"appsDir": "packages"
},
"pluginsConfig": { "pluginsConfig": {
"@nrwl/js": { "@nrwl/js": {
"analyzeSourceFiles": false "analyzeSourceFiles": false

View File

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

View File

@ -29,7 +29,7 @@ export function initHandler() {
if (!fileExists('nx.json')) { if (!fileExists('nx.json')) {
writeJsonFile( writeJsonFile(
'nx.json', 'nx.json',
readJsonFile(join(__dirname, '..', '..', 'presets', 'npm.json')) readJsonFile(join(__dirname, '..', '..', 'presets', 'core.json'))
); );
output.success({ output.success({

View File

@ -197,7 +197,9 @@ export class Workspaces {
} }
} else { } else {
try { try {
return readJsonFile(join(__dirname, '..', '..', 'presets', 'npm.json')); return readJsonFile(
join(__dirname, '..', '..', 'presets', 'core.json')
);
} catch (e) { } catch (e) {
return {}; return {};
} }