Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Adding configuration option #21

Merged
merged 3 commits into from
Oct 9, 2021
Merged

Adding configuration option #21

merged 3 commits into from
Oct 9, 2021

Conversation

mkim219
Copy link
Contributor

@mkim219 mkim219 commented Oct 4, 2021

What I have done

  • Add option program.option('-c,--config','JSON configuration file');
  • Add try and catch statement for checking existence of JSON file. if JSON file does not exist it throws error
  • I have set up default value of input and output in the try and catch statement
  • Create a variable "isJson" and function isJSON for checking whether input is JSON file or not
  • Create function called generateHTMLFromFile(input, output) and generateHTMLFromDir(input, output) based on your code
  • If the input is single text or md file from JSON configuration file, the generateHTMLFromFile function will trigger otherwise generateHTMLFromDir will trigger
  • I have set up the default parameter in case using input without JSON configuration file

@vercel
Copy link

vercel bot commented Oct 4, 2021

Deployment failed with the following error:

The most recent charge for your active payment method has failed. Please update it here: https://vercel.com/teams/senecareza/settings/billing.

@netlify
Copy link

netlify bot commented Oct 4, 2021

❌ Deploy Preview for dazzling-kepler-d7b4d3 failed.

🔨 Explore the source changes: 6460384

🔍 Inspect the deploy log: https://app.netlify.com/sites/dazzling-kepler-d7b4d3/deploys/615e5fc14c5bf20007bc365c

@mkim219
Copy link
Contributor Author

mkim219 commented Oct 4, 2021

Please test the change that I have made and let me know if there is an issue.

@Reza9472 Reza9472 merged commit 6460384 into Reza9472:main Oct 9, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants