@enfyra/create 0.1.3 → 0.1.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -18,9 +18,8 @@ function detectPackageManagers() {
|
|
|
18
18
|
}
|
|
19
19
|
|
|
20
20
|
function getWorkspaceRunCommand(packageManager, workspace, script) {
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
return `npm run ${script} -w ${workspace}`;
|
|
21
|
+
const runCommand = packageManager === 'yarn' ? `yarn ${script}` : `${packageManager} run ${script}`;
|
|
22
|
+
return `(cd ${workspace} && ${runCommand})`;
|
|
24
23
|
}
|
|
25
24
|
|
|
26
25
|
function getPackageRunCommand(packageManager, script) {
|
|
@@ -113,6 +113,17 @@ async function updateWorkspacePackageJson(projectPath, config) {
|
|
|
113
113
|
}
|
|
114
114
|
|
|
115
115
|
async function writePackageManagerConfig(projectPath, config) {
|
|
116
|
+
if (config.packageManager === 'npm') {
|
|
117
|
+
await fs.writeFile(
|
|
118
|
+
path.join(projectPath, '.npmrc'),
|
|
119
|
+
[
|
|
120
|
+
'install-strategy=nested',
|
|
121
|
+
'',
|
|
122
|
+
].join('\n'),
|
|
123
|
+
);
|
|
124
|
+
return;
|
|
125
|
+
}
|
|
126
|
+
|
|
116
127
|
if (config.packageManager !== 'yarn') return;
|
|
117
128
|
|
|
118
129
|
await fs.writeFile(
|
|
@@ -125,6 +136,8 @@ async function writePackageManagerConfig(projectPath, config) {
|
|
|
125
136
|
'',
|
|
126
137
|
'nodeLinker: node-modules',
|
|
127
138
|
'',
|
|
139
|
+
'nmHoistingLimits: workspaces',
|
|
140
|
+
'',
|
|
128
141
|
'npmMinimalAgeGate: 0',
|
|
129
142
|
'',
|
|
130
143
|
].join('\n'),
|