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

Output directory structure breaks when running multiple times #36

Open
ChrisDoernen opened this issue Apr 8, 2020 · 2 comments
Open

Comments

@ChrisDoernen
Copy link

ChrisDoernen commented Apr 8, 2020

Hi,
thanks for the handy tool, exactly what I was looking for.
When I run the command multiple times, the output gets nested below a folder of the locale "de", see screenshot attached.

I use the following command: yarn static-i18n -i en -i de --outputDefault /en/index.html --fixPaths false --output-dir ./website ./website.

When I delete the generated folders ("en/" and "de/") first with rimraf for example, the output is correct. But that prevents live reloading on file change to work (I am using the live-server package) which is a major drawback in the development workflow.

Best
Chris

static-i18n

@ChrisDoernen
Copy link
Author

... the right index.html files were transformed correctly though. So cleaning up the redundtant directories in "de" with rimraf is a valid workaround for me at the moment. But that may not be good when there are more than 2 languages involved :)

@danhper
Copy link
Member

danhper commented Aug 9, 2020

Hi and sorry for the huge delay.
If you would have time to send a PR it would be really great. If you won't have time, please let me know and I will try to have a look.

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

No branches or pull requests

2 participants