@@ -504,6 +504,17 @@ module.exports = class extends Generator {
504504 generator . extensionConfig . pkgManager = pckgManagerAnswer . pkgManager ;
505505 } ) ;
506506 } ,
507+
508+ askForGithubWorkflows : ( ) => {
509+ return generator . prompt ( {
510+ type : 'confirm' ,
511+ name : 'gitHubWorkFlowInit' ,
512+ message : 'Include GitHub workflow file?' ,
513+ default : true
514+ } ) . then ( gitAnswer => {
515+ generator . extensionConfig . gitHubWorkFlowInit = gitAnswer . gitHubWorkFlowInit ;
516+ } ) ;
517+ } ,
507518 } ;
508519
509520 // run all prompts in sequence. Results can be ignored.
@@ -567,6 +578,9 @@ module.exports = class extends Generator {
567578 this . fs . copy ( this . sourceRoot ( ) + '/gitignore' , context . name + '/.gitignore' ) ;
568579 this . fs . copy ( this . sourceRoot ( ) + '/gitattributes' , context . name + '/.gitattributes' ) ;
569580 }
581+ if ( this . extensionConfig . gitHubWorkFlowInit ) {
582+ this . fs . copy ( this . sourceRoot ( ) + '/github' , context . name + '/.github' ) ;
583+ }
570584 }
571585
572586 // Write Color Theme Extension
@@ -600,6 +614,9 @@ module.exports = class extends Generator {
600614 this . fs . copy ( this . sourceRoot ( ) + '/gitignore' , context . name + '/.gitignore' ) ;
601615 this . fs . copy ( this . sourceRoot ( ) + '/gitattributes' , context . name + '/.gitattributes' ) ;
602616 }
617+ if ( this . extensionConfig . gitHubWorkFlowInit ) {
618+ this . fs . copy ( this . sourceRoot ( ) + '/github' , context . name + '/.github' ) ;
619+ }
603620 }
604621
605622 // Write Language Extension
@@ -624,6 +641,9 @@ module.exports = class extends Generator {
624641 this . fs . copy ( this . sourceRoot ( ) + '/gitignore' , context . name + '/.gitignore' ) ;
625642 this . fs . copy ( this . sourceRoot ( ) + '/gitattributes' , context . name + '/.gitattributes' ) ;
626643 }
644+ if ( this . extensionConfig . gitHubWorkFlowInit ) {
645+ this . fs . copy ( this . sourceRoot ( ) + '/github' , context . name + '/.github' ) ;
646+ }
627647 }
628648
629649 // Write Snippets Extension
@@ -641,6 +661,9 @@ module.exports = class extends Generator {
641661 this . fs . copy ( this . sourceRoot ( ) + '/gitignore' , context . name + '/.gitignore' ) ;
642662 this . fs . copy ( this . sourceRoot ( ) + '/gitattributes' , context . name + '/.gitattributes' ) ;
643663 }
664+ if ( this . extensionConfig . gitHubWorkFlowInit ) {
665+ this . fs . copy ( this . sourceRoot ( ) + '/github' , context . name + '/.github' ) ;
666+ }
644667 }
645668
646669 // Write Snippets Extension
@@ -657,6 +680,9 @@ module.exports = class extends Generator {
657680 this . fs . copy ( this . sourceRoot ( ) + '/gitignore' , context . name + '/.gitignore' ) ;
658681 this . fs . copy ( this . sourceRoot ( ) + '/gitattributes' , context . name + '/.gitattributes' ) ;
659682 }
683+ if ( this . extensionConfig . gitHubWorkFlowInit ) {
684+ this . fs . copy ( this . sourceRoot ( ) + '/github' , context . name + '/.github' ) ;
685+ }
660686 }
661687
662688 // Write Command Extension (TypeScript)
@@ -680,6 +706,10 @@ module.exports = class extends Generator {
680706
681707 this . fs . copy ( this . sourceRoot ( ) + '/tslint.json' , context . name + '/tslint.json' ) ;
682708
709+ if ( this . extensionConfig . gitHubWorkFlowInit ) {
710+ this . fs . copy ( this . sourceRoot ( ) + '/github' , context . name + '/.github' ) ;
711+ }
712+
683713 this . extensionConfig . installDependencies = true ;
684714 }
685715
@@ -705,6 +735,10 @@ module.exports = class extends Generator {
705735 this . fs . copyTpl ( this . sourceRoot ( ) + '/package.json' , context . name + '/package.json' , context ) ;
706736 this . fs . copyTpl ( this . sourceRoot ( ) + '/.eslintrc.json' , context . name + '/.eslintrc.json' , context ) ;
707737
738+ if ( this . extensionConfig . gitHubWorkFlowInit ) {
739+ this . fs . copy ( this . sourceRoot ( ) + '/github' , context . name + '/.github' ) ;
740+ }
741+
708742 this . extensionConfig . installDependencies = true ;
709743 }
710744
0 commit comments