How to get nested prompts result in yeoman generator -


I'm a JavaScript beginning and read the following write your first generator tutorials and other generators code I managed to get this Is away with my first generator

I have tried many ways to get this work done and have failed miserably, if someone can point me in the right direction then I would be grateful. . I should probably say I used generator-generator v0.4.3

Oops forgot to say the problem is getting feedback from the flavor list

  askFor: function ( ) {Var done = this.async (); Var prompts = [{name: 'sitename', message: 'What do you want your app / site name to be?', Default: 'new project'}, {type: 'checkbox', name: 'utilities', message : 'Please select additional features' option: [{Name: 'Modernizr', Value: 'includeModernizr', checked: false} {name: 'answer', value: 'includeRespond', checked: false}]} , {Type: 'list', name: 'taste', message: 'what type of CSS do you want to use?', Option: [{name: 'saas', value: 'include'}, {name: 'Sas with Compass' value:' incl UdeCompass'}, {name: 'stylus' value' IncludeStylus'}, {name: "Standard CSS 'value' IncludeCss"}], Default: 1} {When: function (props) {return props.flavour .indexOf ('include')! == -1; }, Type: Confirm, Name: 'Libsus', Value:' Incorrect Libsas', Message: 'Would you like to use Libs? Read about \ n '+ chalk.green (' https://github.com/andrew/node-sass#nodesass'), default: wrong}]; Thiskprompt (signals, function (prop) {var features = props.features; function HasFeature (feat) {features.indexOf (feat) return == -1 ;!} this.sitename = props.sitename; this.includeModernizr = hasFeature ( 'includeModernizr'); this.includeRespond = hasFeature ( 'includeRespond'); this.includeLibSass = props.libsass; this.includeRubySass = // this clearly to this this.includeSass = props.includeSass wrong way Props.libsass; done ();} .bind (this)); }, Instead of using the  

Hafecr function, you can use Colship . This is an easy way to remove the option.

  this.includeModernizr = _.includes (props.features, 'include moderator');  

Comments

Popular posts from this blog

import - Python ImportError: No module named wmi -

Editing Python Class in Shell and SQLAlchemy -

lua - HowTo create a fuel bar -