@@ -17,8 +17,6 @@ module.exports = generators.Base.extend({
1717
1818 prompting : {
1919 askFor : function ( ) {
20- var done = this . async ( )
21-
2220 // Have Yeoman greet the user.
2321 this . log ( 'Welcome to using swift.framework generator!' )
2422 this . log ( 'If you have any questions, please submit issue at https://github.com/cybertk/generator-swift-framework/issues' )
@@ -43,68 +41,56 @@ module.exports = generators.Base.extend({
4341 store : true
4442 } ]
4543
46- this . prompt ( prompts , function ( props ) {
44+ return this . prompt ( prompts ) . then ( function ( props ) {
4745 this . projectName = props . projectName
4846 this . organizationName = props . organizationName
4947 this . organizationId = props . organizationId
5048
5149 this . props = props
52-
53- done ( )
5450 } . bind ( this ) )
5551 } ,
5652
5753 askForCocoaPods : function ( ) {
58- var done = this . async ( )
59-
6054 var prompts = [ {
6155 type : 'confirm' ,
6256 name : 'cocoapods' ,
6357 message : 'Would you like to distribute via CocoaPods?' ,
6458 default : true
6559 } ]
6660
67- this . prompt ( prompts , function ( props ) {
61+ return this . prompt ( prompts ) . then ( function ( props ) {
6862 this . cocoapods = props . cocoapods
69- done ( )
7063 } . bind ( this ) )
7164 } ,
7265
7366 askForGitHub : function ( ) {
74- var done = this . async ( )
75-
7667 var prompts = [ {
7768 type : 'input' ,
7869 name : 'githubUser' ,
7970 message : 'Would you mind telling me your username on GitHub?' ,
8071 store : true
8172 } ]
8273
83- this . prompt ( prompts , function ( props ) {
74+ return this . prompt ( prompts ) . then ( function ( props ) {
8475 this . githubUser = props . githubUser
8576 this . props = _ . extend ( this . props , props )
86- done ( )
8777 } . bind ( this ) )
8878 } ,
8979
9080 askForTravis : function ( ) {
91- var done = this . async ( )
92-
9381 var prompts = [ {
9482 type : 'confirm' ,
9583 name : 'travis' ,
9684 message : 'Would you like to enable Travis CI?' ,
9785 default : true
9886 } ]
9987
100- this . prompt ( prompts , function ( props ) {
88+ return this . prompt ( prompts ) . then ( function ( props ) {
10189 this . travis = props . travis
102- done ( )
10390 } . bind ( this ) )
10491 } ,
10592
10693 askForCertPath : function ( ) {
107- var done = this . async ( )
10894 var travis = this . travis
10995
11096 var prompts = [ {
@@ -118,9 +104,8 @@ module.exports = generators.Base.extend({
118104 }
119105 } ]
120106
121- this . prompt ( prompts , function ( props ) {
107+ return this . prompt ( prompts ) . then ( function ( props ) {
122108 this . mobileprovision = props . mobileprovision
123- done ( )
124109 } . bind ( this ) )
125110 }
126111 } ,
0 commit comments