@@ -50,25 +50,42 @@ module.exports = class extends Generator {
5050 {
5151 type : 'input' ,
5252 name : 'elementNodeVersion' ,
53- message : 'Supported Node version?' ,
53+ message : 'Node version?' ,
5454 default : 15 ,
5555 } ,
56+ {
57+ type : 'list' ,
58+ name : 'elementPM' ,
59+ message : 'Package manager?' ,
60+ choices : [
61+ { name : 'Yarn' , value : 'yarn' } ,
62+ { name : 'NPM' , value : 'npm' } ,
63+ ] ,
64+ default : 0 ,
65+ } ,
5666 ] ;
5767
58- const props = await this . prompt ( prompts ) ;
68+ const { elementPM, ...restProps } = await this . prompt ( prompts ) ;
69+
70+ this . env . options . nodePackageManager = elementPM ;
5971
6072 this . props = {
61- ...props ,
62- elementName : changeCase . paramCase ( props . elementName ) ,
73+ ...restProps ,
74+ elementName : changeCase . paramCase ( restProps . elementName ) ,
6375 elementOrganizationName : changeCase . paramCase (
64- props . elementOrganizationName ,
76+ restProps . elementOrganizationName ,
6577 ) ,
6678 } ;
6779 }
6880
6981 writing ( ) {
7082 this . fs . copyTpl (
71- [ this . templatePath ( '**/*' ) , this . templatePath ( '**/.*' ) ] ,
83+ [
84+ this . templatePath ( '**/*' ) ,
85+ this . templatePath ( '**/.*' ) ,
86+ this . templatePath ( '**/.husky/*' ) ,
87+ this . templatePath ( '**/.husky/.*' ) ,
88+ ] ,
7289 this . destinationPath ( ) ,
7390 this . props ,
7491 ) ;
@@ -78,8 +95,4 @@ module.exports = class extends Generator {
7895 this . destinationPath ( '.env' ) ,
7996 ) ;
8097 }
81-
82- install ( ) {
83- this . yarnInstall ( ) ;
84- }
8598} ;
0 commit comments