Javascript Grunt Init条件提示模板

Javascript Grunt Init条件提示模板,javascript,gruntjs,grunt-init,Javascript,Gruntjs,Grunt Init,我开始使用grunt init模板并尝试编写条件提示。我已经讨论了几个小时,但没有取得真正的成功。javascript不是我最强大的语言,这可能没有帮助 我找到了这个答案,但它并不能真正解决我想做的事情: 我正试图按照以下思路做一些事情: exports.template = function(grunt, init, done) { init.process({}, [ // Prompt for these values. {

我开始使用grunt init模板并尝试编写条件提示。我已经讨论了几个小时,但没有取得真正的成功。javascript不是我最强大的语言,这可能没有帮助

我找到了这个答案,但它并不能真正解决我想做的事情:

我正试图按照以下思路做一些事情:

exports.template = function(grunt, init, done) {

    init.process({}, [
        // Prompt for these values.
        {
            name: 'css',
            message: 'Which CSS Preprocess are you using?',
            default: 'SASS/Less/Stylus/none'
        }
        if (css.value == 'SASS'){
            // prompt for Compass / Bourbon / None;
        }
    ], function(err, props) {
    ...
显然,这是行不通的,但是我已经尝试了grunt init的源代码和文档,没有发现任何有用的东西


如果这是不可能的,那么还有其他grunt项目生成器可以处理这种条件逻辑吗?

对于任何想知道的人来说,似乎要执行我的请求,您必须修改grunt init源来处理这些条件。结果我用了约曼发电机