@@ -6,7 +6,6 @@ import * as glob from 'glob';
66import * as semver from 'semver' ;
77import * as chalk from 'chalk' ;
88import { execSync } from 'child_process' ;
9- import npmWhich = require( 'npm-which' ) ;
109const yosay = require ( 'yosay' ) ;
1110const toPascalCase = require ( 'to-pascal-case' ) ;
1211const isWindows = / ^ w i n / . test ( process . platform ) ;
@@ -165,15 +164,6 @@ class MyGenerator extends yeoman.Base {
165164 }
166165
167166 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-
177167 this . installDependencies ( {
178168 npm : true ,
179169 bower : false ,
@@ -186,14 +176,6 @@ class MyGenerator extends yeoman.Base {
186176 }
187177}
188178
189- function getPathToExecutable ( executableName : string ) {
190- try {
191- return npmWhich ( __dirname ) . sync ( executableName ) ;
192- } catch ( ex ) {
193- return null ;
194- }
195- }
196-
197179function assertNpmVersionIsAtLeast ( minVersion : string ) {
198180 const runningVersion = execSync ( 'npm -v' ) . toString ( ) ;
199181 if ( ! semver . gte ( runningVersion , minVersion , /* loose */ true ) ) {
0 commit comments