Skip to content
Permalink
Browse files

Adds developer name to the startup questionnaire

  • Loading branch information...
codewithkyle committed Jun 8, 2019
1 parent 817588e commit ae8b3439fe0570fca92a76ac66e8346e0f23671a
Showing with 22 additions and 2 deletions.
  1. +3 −0 .env.example
  2. +5 −1 CHANGELOG.md
  3. +11 −0 build-tools/setup/questions.js
  4. +3 −1 build-tools/setup/setup.js
@@ -48,3 +48,6 @@ SYSTEM_EMAIL_NAME="REPLACE_ME"

# Testing Email Adress
TEST_EMAIL_ADDRESS="REPLACE_ME"

# Your name
DEV_NAME="REPLACE_ME"
@@ -1,4 +1,8 @@
## 0.1.5 - Unreleased
## 0.2.0 - Unreleased

### Added

- Adds: Developers name input to the startup questionnaire [#167](https://github.com/Pageworks/papertrain/issues/167)

## 0.1.4 - 2019-06-05

@@ -36,6 +36,17 @@ module.exports = {
return 'Please enter a project URL.';
}
},
{
name: 'developerName',
type: 'input',
message: 'Your Full Name:',
validate: (input)=>{
if(input !== ''){
return true;
}
return 'Please enter your full name.';
}
},
{
name: 'devEmailAddress',
type: 'input',
@@ -28,7 +28,8 @@ askQuestions = (async ()=>{

const question2 = await questions.getProjectURL(projectDetails.projectName);
projectDetails.devUrl = `${ question2.defaultUrl }`;
projectDetails.devEmail = devEmailAddress;
projectDetails.devName = question2.developerName;
projectDetails.devEmail = question2.devEmailAddress;

const question3 = await questions.getDatabaseDetails(projectDetails.projectName);
projectDetails.driver = question3.driver;
@@ -82,6 +83,7 @@ askQuestions = (async ()=>{
modifiedFile = modifiedFile.replace(/SYSTEM_EMAIL_NAME="REPLACE_ME"/, `SYSTEM_EMAIL_NAME="${ projectDetails.projectName }"`);
modifiedFile = modifiedFile.replace(/SYSTEM_EMAIL_ADDRESS="REPLACE_ME"/, `SYSTEM_EMAIL_ADDRESS="no-reply@${ projectDetails.devUrl }"`);
modifiedFile = modifiedFile.replace(/TEST_EMAIL_ADDRESS="REPLACE_ME"/, `TEST_EMAIL_ADDRESS="${ projectDetails.devEmail }"`);
modifiedFile = modifiedFile.replace(/DEV_NAME="REPLACE_ME"/, `DEV_NAME="${ projectDetails.devName }"`);

fs.writeFile('.env', modifiedFile, (err)=>{
if(err){

0 comments on commit ae8b343

Please sign in to comment.
You can’t perform that action at this time.