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 should preserve directory structure #25

Open
m99coder opened this issue Sep 3, 2019 · 1 comment
Open

Output directory should preserve directory structure #25

m99coder opened this issue Sep 3, 2019 · 1 comment

Comments

@m99coder
Copy link

m99coder commented Sep 3, 2019

I’m using the following command:

./node_modules/.bin/mustache-prestatic ./views/**/*.html --partials ./partials/**/*.mustache --output ./public --verbose
templateFiles [
  './views/directory/file.html'
]
data undefined
partials [
  './partials/directory/partial.mustache'
]

The public folder contains file.html on root level, but should preserve the structure so that public contains a directory named directory which itself contains file.html.

@Siilwyn
Copy link
Owner

Siilwyn commented Sep 10, 2019

Again thanks for the detailed issue! ^^

The code writing the file only takes into account the file name and given output directory:

let outputPath = path.join(argv.output, outputFileName) + '.html';

It would be very nice if the directory structure would be kept intact.

In the foreseeable future I won't have time to fix this issue unfortunately but a PR is more than welcome and will be published asap.

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