@@ -17,8 +17,6 @@ module.exports = generators.Base.extend({
17
17
18
18
prompting : {
19
19
askFor : function ( ) {
20
- var done = this . async ( )
21
-
22
20
// Have Yeoman greet the user.
23
21
this . log ( 'Welcome to using swift.framework generator!' )
24
22
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({
43
41
store : true
44
42
} ]
45
43
46
- this . prompt ( prompts , function ( props ) {
44
+ return this . prompt ( prompts ) . then ( function ( props ) {
47
45
this . projectName = props . projectName
48
46
this . organizationName = props . organizationName
49
47
this . organizationId = props . organizationId
50
48
51
49
this . props = props
52
-
53
- done ( )
54
50
} . bind ( this ) )
55
51
} ,
56
52
57
53
askForCocoaPods : function ( ) {
58
- var done = this . async ( )
59
-
60
54
var prompts = [ {
61
55
type : 'confirm' ,
62
56
name : 'cocoapods' ,
63
57
message : 'Would you like to distribute via CocoaPods?' ,
64
58
default : true
65
59
} ]
66
60
67
- this . prompt ( prompts , function ( props ) {
61
+ return this . prompt ( prompts ) . then ( function ( props ) {
68
62
this . cocoapods = props . cocoapods
69
- done ( )
70
63
} . bind ( this ) )
71
64
} ,
72
65
73
66
askForGitHub : function ( ) {
74
- var done = this . async ( )
75
-
76
67
var prompts = [ {
77
68
type : 'input' ,
78
69
name : 'githubUser' ,
79
70
message : 'Would you mind telling me your username on GitHub?' ,
80
71
store : true
81
72
} ]
82
73
83
- this . prompt ( prompts , function ( props ) {
74
+ return this . prompt ( prompts ) . then ( function ( props ) {
84
75
this . githubUser = props . githubUser
85
76
this . props = _ . extend ( this . props , props )
86
- done ( )
87
77
} . bind ( this ) )
88
78
} ,
89
79
90
80
askForTravis : function ( ) {
91
- var done = this . async ( )
92
-
93
81
var prompts = [ {
94
82
type : 'confirm' ,
95
83
name : 'travis' ,
96
84
message : 'Would you like to enable Travis CI?' ,
97
85
default : true
98
86
} ]
99
87
100
- this . prompt ( prompts , function ( props ) {
88
+ return this . prompt ( prompts ) . then ( function ( props ) {
101
89
this . travis = props . travis
102
- done ( )
103
90
} . bind ( this ) )
104
91
} ,
105
92
106
93
askForCertPath : function ( ) {
107
- var done = this . async ( )
108
94
var travis = this . travis
109
95
110
96
var prompts = [ {
@@ -118,9 +104,8 @@ module.exports = generators.Base.extend({
118
104
}
119
105
} ]
120
106
121
- this . prompt ( prompts , function ( props ) {
107
+ return this . prompt ( prompts ) . then ( function ( props ) {
122
108
this . mobileprovision = props . mobileprovision
123
- done ( )
124
109
} . bind ( this ) )
125
110
}
126
111
} ,
0 commit comments