Skip to content

Commit

Permalink
We do need these after all
Browse files Browse the repository at this point in the history
Reverts 705167b
  • Loading branch information
PaulAdamDavis committed Feb 3, 2025
1 parent ed8effd commit 6304908
Showing 1 changed file with 48 additions and 0 deletions.
48 changes: 48 additions & 0 deletions tasks/json-clean.js
Original file line number Diff line number Diff line change
Expand Up @@ -234,6 +234,51 @@ const getFullTaskList = (options) => {
let theData = _.clone(user.originalData);

const promptOptions = [
{
type: 'input',
name: 'userID',
message: 'The new ID:',
filter: function (val) {
return val.trim();
},
validate: (input) => {
if (input.length) {
return true;
} else {
return 'Please provide an ID';
}
}
},
{
type: 'input',
name: 'userName',
message: 'The new name:',
filter: function (val) {
return val.trim();
},
validate: (input) => {
if (input.length) {
return true;
} else {
return 'Please provide a name';
}
}
},
{
type: 'input',
name: 'userSlug',
message: 'The new slug:',
filter: function (val) {
return val.trim();
},
validate: (input) => {
if (input.length) {
return true;
} else {
return 'Please provide a slug';
}
}
},
{
type: 'input',
name: 'userEmail',
Expand All @@ -253,6 +298,9 @@ const getFullTaskList = (options) => {

await inquirer.prompt(promptOptions).then(async (answers) => {
// Prompt for updates to these values
theData.id = answers.userID; // Something new
theData.name = answers.userName; // Something new
theData.slug = answers.userSlug; // Something new
theData.email = answers.userEmail; // Something new

// Add the new data to the user object
Expand Down

0 comments on commit 6304908

Please sign in to comment.