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

Fixes issue #14 by adding support for -C option #15

Merged
merged 9 commits into from
Oct 13, 2022

Conversation

SerpentBytes
Copy link

This PR fixes and closes #14 by adding support for the -C option.

Users can now pass a .json file with keys such as input, output, and lang to override the application's default behaviour.

@Ririio
Copy link
Owner

Ririio commented Oct 11, 2022

The code is outdated, might need to update it to fit the current version of the repository

@SerpentBytes
Copy link
Author

I will update the code with the changes you made to the main branch 3 hours ago.

@Ririio
Copy link
Owner

Ririio commented Oct 11, 2022

I will update the code with the changes you made to the main branch 3 hours ago.

I also noticed that your "lang" command doesn't affect the current iteration of input. When I change the language to "en-CA", this change only occurs on the next config command-- the current ones will have a value of its previous language i.e., "en-US"

View your .env file after running the config to see if the value are the same for the html files

@SerpentBytes
Copy link
Author

SerpentBytes commented Oct 12, 2022

I have updated the code.

The .env file was not updating correctly because you are using functions like readFile and writeFile from the fs module instead of using readFileSync and writeFileSync. Since you are using asynchronous functions, they return immediately while still functioning in the background. I have updated your readFileEnv to stop execution until the values in the .env file are overwritten correctly.

@Ririio Ririio merged commit fb97695 into Ririio:main Oct 13, 2022
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.

Feature request: add configuration support
2 participants