Skip to content

Commit 6697913

Browse files
authored
fix: just use npm to install subgen dependencies (#130)
1 parent 3da8d22 commit 6697913

File tree

3 files changed

+6
-139
lines changed

3 files changed

+6
-139
lines changed

generators/app/index.js

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,6 @@ import { glob } from "glob";
99
import chalk from "chalk";
1010
import yosay from "yosay";
1111
import libnpmconfig from "libnpmconfig";
12-
import yarnOrNpm from "yarn-or-npm";
13-
const { hasYarn } = yarnOrNpm;
1412
import AdmZip from "adm-zip";
1513
import { request } from "@octokit/request";
1614
import { Octokit } from "@octokit/rest";
@@ -201,7 +199,7 @@ export default class extends Generator {
201199
async _npmInstall(dir, withDevDeps) {
202200
return new Promise(
203201
function (resolve, reject) {
204-
spawn(hasYarn() ? "yarn" : "npm", ["install", "--no-progress", "--ignore-engines", "--ignore-scripts"], {
202+
spawn("npm", ["install", "--no-progress", "--ignore-engines", "--ignore-scripts"], {
205203
stdio: this.config.verbose ? "inherit" : "ignore",
206204
cwd: dir,
207205
env: {
@@ -615,7 +613,7 @@ export default class extends Generator {
615613
// filter the local options and the help command
616614
const opts = Object.keys(this._options).filter((optionName) => !(generatorOptions.hasOwnProperty(optionName) || optionName === "help"));
617615

618-
// run yarn/npm install (always for self-healing!)
616+
// run npm install (always for self-healing!)
619617
if (this.options.verbose) {
620618
this.log("Installing the subgenerator dependencies...");
621619
}

package-lock.json

Lines changed: 4 additions & 134 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,6 @@
5656
"glob": "^10.2.7",
5757
"libnpmconfig": "^1.2.1",
5858
"rimraf": "^5.0.1",
59-
"yarn-or-npm": "^3.0.1",
6059
"yeoman-environment": "^3.19.3",
6160
"yeoman-generator": "^5.9.0",
6261
"yosay": "^2.0.2"

0 commit comments

Comments
 (0)