-
Notifications
You must be signed in to change notification settings - Fork 12
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #31 from tejovanthWork/master
adds select options for field-variables
- Loading branch information
Showing
5 changed files
with
1,515 additions
and
314 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,37 +1,49 @@ | ||
module.exports = [ | ||
{ | ||
name: "Normal Component", | ||
templatePath: "templates/COMPONENT_NAME/", | ||
outputPath: "output/", | ||
fields: [ | ||
{ | ||
templateVariable: 'COMPONENT_NAME', | ||
question: "What is your components name?", | ||
errorMessage: "Can't be more than 10 characters long." | ||
}, | ||
{ | ||
templateVariable: 'specialNumber', | ||
question: "What is your favourite letter?", | ||
errorMessage: "Z is not valid.", | ||
isValid(val) { | ||
return val !== 'Z' | ||
} | ||
} | ||
] | ||
}, | ||
{ | ||
name: "Container Component", | ||
templatePath: "templates/CONTAINER_NAME.js", | ||
outputPath: "output/containers", | ||
fields: [ | ||
{ | ||
templateVariable: 'CONTAINER_NAME', | ||
question: "What is your container component's name?", | ||
errorMessage: "Must be at least 5 characters long.", | ||
isValid(val) { | ||
return val.length <= 5 | ||
} | ||
} | ||
] | ||
} | ||
{ | ||
name: "Normal Component", | ||
templatePath: "templates/COMPONENT_NAME/", | ||
outputPath: "output/", | ||
fields: [ | ||
{ | ||
templateVariable: "COMPONENT_NAME", | ||
question: "What is your components name?", | ||
errorMessage: "Can't be more than 10 characters long." | ||
}, | ||
{ | ||
templateVariable: "specialNumber", | ||
question: "What is your favourite letter?", | ||
errorMessage: "Z is not valid.", | ||
isValid(val) { | ||
return val !== "Z"; | ||
} | ||
} | ||
] | ||
}, | ||
{ | ||
name: "Container Component", | ||
templatePath: "templates/CONTAINER_NAME.js", | ||
outputPath: "output/containers", | ||
fields: [ | ||
{ | ||
templateVariable: "CONTAINER_NAME", | ||
question: "What is your container component's name?", | ||
errorMessage: "Must be at least 5 characters long.", | ||
isValid(val) { | ||
return val.length <= 5; | ||
} | ||
} | ||
] | ||
}, | ||
{ | ||
name: "List of options", | ||
templatePath: "templates/CONTAINER_NAME.js", | ||
outputPath: "output/containers", | ||
fields: [ | ||
{ | ||
templateVariable: "CONTAINER_NAME", | ||
question: "Select one of the following names:", | ||
choices: ["TestContainer", "CoolContainer"] | ||
} | ||
] | ||
} | ||
]; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.