File tree Expand file tree Collapse file tree 3 files changed +9
-3
lines changed
Expand file tree Collapse file tree 3 files changed +9
-3
lines changed Original file line number Diff line number Diff line change 11const path = require ( 'path' )
22const EventEmitter = require ( 'events' ) . EventEmitter
3+ const inquirer = require ( 'inquirer' )
34
45module . exports = function ( Spike , args ) {
56 const emitter = new EventEmitter ( )
7+
68 emitter . on ( 'done' , ( project ) => {
79 emitter . emit ( 'create' , `project created at ${ path . resolve ( project . config . context ) } ` )
810 } )
11+
912 process . nextTick ( ( ) => Spike . new ( {
1013 root : args . path ,
1114 emitter : emitter ,
12- overrides : args . overrides
15+ locals : args . overrides ,
16+ inquirer : inquirer . prompt . bind ( inquirer )
1317 } ) )
18+
1419 return emitter
1520}
Original file line number Diff line number Diff line change 1414 "dependencies" : {
1515 "argparse" : " ^1.0.6" ,
1616 "chalk" : " ^1.1.3" ,
17+ "inquirer" : " ^1.0.2" ,
1718 "lodash.reduce" : " ^4.4.0" ,
18- "spike-core" : " ^0.2.1 "
19+ "spike-core" : " ^0.3.0 "
1920 },
2021 "devDependencies" : {
2122 "ava" : " ^0.14.0" ,
Original file line number Diff line number Diff line change @@ -67,7 +67,7 @@ test.cb('new', (t) => {
6767 cli . on ( 'info' , ( opts ) => {
6868 t . truthy ( opts . root )
6969 t . truthy ( opts . emitter )
70- t . truthy ( opts . overrides )
70+ t . truthy ( opts . locals )
7171 } )
7272 cli . on ( 'success' , ( res ) => {
7373 t . truthy ( res . match ( / p r o j e c t c r e a t e d a t .* t e s t / ) )
You can’t perform that action at this time.
0 commit comments