@@ -6,7 +6,6 @@ import * as glob from 'glob';
6
6
import * as semver from 'semver' ;
7
7
import * as chalk from 'chalk' ;
8
8
import { execSync } from 'child_process' ;
9
- import npmWhich = require( 'npm-which' ) ;
10
9
const yosay = require ( 'yosay' ) ;
11
10
const toPascalCase = require ( 'to-pascal-case' ) ;
12
11
const isWindows = / ^ w i n / . test ( process . platform ) ;
@@ -165,15 +164,6 @@ class MyGenerator extends yeoman.Base {
165
164
}
166
165
167
166
installingDeps ( ) {
168
- // If available, restore dependencies using Yarn instead of NPM
169
- const yarnPath = getPathToExecutable ( 'yarn' ) ;
170
- if ( ! ! yarnPath ) {
171
- this . log ( 'Will restore NPM dependencies using \'yarn\' installed at ' + yarnPath ) ;
172
- this . npmInstall = ( pkgs , options , cb ) => {
173
- return ( this as any ) . runInstall ( yarnPath , pkgs , options , cb ) ;
174
- } ;
175
- }
176
-
177
167
this . installDependencies ( {
178
168
npm : true ,
179
169
bower : false ,
@@ -186,14 +176,6 @@ class MyGenerator extends yeoman.Base {
186
176
}
187
177
}
188
178
189
- function getPathToExecutable ( executableName : string ) {
190
- try {
191
- return npmWhich ( __dirname ) . sync ( executableName ) ;
192
- } catch ( ex ) {
193
- return null ;
194
- }
195
- }
196
-
197
179
function assertNpmVersionIsAtLeast ( minVersion : string ) {
198
180
const runningVersion = execSync ( 'npm -v' ) . toString ( ) ;
199
181
if ( ! semver . gte ( runningVersion , minVersion , /* loose */ true ) ) {
0 commit comments