Commit cbe8445a authored by Philipp Nowinski's avatar Philipp Nowinski
Browse files

[TASK] nest prompts under priority

parent b37dba8a
......@@ -27,88 +27,89 @@ module.exports = yeoman.generators.Base.extend((function() {
Generator.pkg = require('../package.json');
};
Generator.prompting = function() {
var done = this.async();
// Greet the user
this.log(yosay(
'Welcome to the dandy ' + chalk.red('Sgalinski') + ' generator!'
));
this.prompt({
type: 'list',
name: 'projectType',
message: 'What kind of project do you want me to build?',
choices: [
Generator.prompting = {
basicPrompts: function() {
var done = this.async();
// Greet the user
this.log(yosay(
'Welcome to the dandy ' + chalk.red('Sgalinski') + ' generator!'
));
this.prompt({
type: 'list',
name: 'projectType',
message: 'What kind of project do you want me to build?',
choices: [
{
value: 'extbaseExtension',
name: 'Typo3 Extbase Extension'
},
{
value: 'standalone',
name: 'Standalone Frontend Project'
},
{
value: 'typo3Frontend',
name: 'Typo3 Frontend Setup'
}
]
}, function(answers) {
projectType = answers.projectType
done();
});
},
advancedPrompts: function() {
var done = this.async(),
questions;
// define questions
questions = [
{
type: 'input',
name: 'projectName',
message: 'Please enter the name for your project',
default: process.cwd().split(path.sep).pop()
},
{
type: 'input',
name: 'cssPath',
message: 'Please specify the path to the compiled css files',
default: resourcePathsSuggestions[projectType].cssPath
},
{
type: 'input',
name: 'sassPath',
message: 'Please specify the path to the sass source files',
default: resourcePathsSuggestions[projectType].sassPath
},
{
value: 'extbaseExtension',
name: 'Typo3 Extbase Extension'
type: 'input',
name: 'javascriptPath',
message: 'Please specify the path to the javascript files',
default: resourcePathsSuggestions[projectType].javascriptPath
},
{
value: 'standalone',
name: 'Standalone Frontend Project'
type: 'input',
name: 'compassConfigPath',
message: 'Please specify the path to config.rb file for compass',
default: '.'
},
{
value: 'typo3Frontend',
name: 'Typo3 Frontend Setup'
type: 'input',
name: 'imagesPath',
message: 'Please specify the path to the images',
default: resourcePathsSuggestions[projectType].imagesPath
}
]
}, function(answers) {
projectType = answers.projectType
done();
});
};
];
Generator.advancedPrompting = function() {
var done = this.async(),
questions;
// define questions
questions = [
{
type: 'input',
name: 'projectName',
message: 'Please enter the name for your project',
default: process.cwd().split(path.sep).pop()
},
{
type: 'input',
name: 'cssPath',
message: 'Please specify the path to the compiled css files',
default: resourcePathsSuggestions[projectType].cssPath
},
{
type: 'input',
name: 'sassPath',
message: 'Please specify the path to the sass source files',
default: resourcePathsSuggestions[projectType].sassPath
},
{
type: 'input',
name: 'javascriptPath',
message: 'Please specify the path to the javascript files',
default: resourcePathsSuggestions[projectType].javascriptPath
},
{
type: 'input',
name: 'compassConfigPath',
message: 'Please specify the path to config.rb file for compass',
default: '.'
},
{
type: 'input',
name: 'imagesPath',
message: 'Please specify the path to the images',
default: resourcePathsSuggestions[projectType].imagesPath
}
];
// ask questions
this.prompt(questions, function(_answers) {
answers = _answers;
done();
});
};
// ask questions
this.prompt(questions, function(_answers) {
answers = _answers;
done();
});
}
}
Generator.writeGeneralConfigs = function() {
this.fs.copy(
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment