Skip to content
This repository has been archived by the owner on Sep 19, 2023. It is now read-only.

Commit

Permalink
Add a RequireJS module loader option
Browse files Browse the repository at this point in the history
  • Loading branch information
kpoddubnyi committed Feb 8, 2018
1 parent ab6baa5 commit 65ea26b
Showing 1 changed file with 30 additions and 1 deletion.
31 changes: 30 additions & 1 deletion modules/questions.js
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,31 @@ module.exports = () => {
projectType()
.then(() => {
let questions = [{
message: 'Would you like to use RequireJS module loader?',
type: 'list',
name: 'value',
choices: [{
name: 'Yes',
// With-Require git branch
value: 'With-Require'
}, {
name: 'No',
value: 'default'
}],
}, {
when: function (answers) {
if (answers.value === 'With-Require') {
// Push the additional information to config
config[0] = {
url: defaultGit,
branch: 'With-Require'
};

return false;
}

return true;
},
message: 'Would you like to use Pug?',
type: 'list',
name: 'value',
Expand All @@ -78,6 +103,10 @@ module.exports = () => {
},
{
when: function (answers) {
if (answers.value === 'With-Require') {
return false;
}

if (answers.value === 'With-Pug') {
// Push the additional information to config
config.push({
Expand All @@ -101,7 +130,7 @@ module.exports = () => {
},
{
when: function (answers) {
return answers.value === 'CssFramework-Yes' ? false : true;
return answers.value === 'CssFramework-No' ? true : false;
},
// This question will appear only if user doesn't want to use CSS Frameworks
message: 'Would you like to use SCSS maps?',
Expand Down

0 comments on commit 65ea26b

Please sign in to comment.