Skip to content

unified-engine: Respect directory hierarchy when outputting to a different directory #138

Answered by wooorm
NickSto asked this question in Q&A
Discussion options

You must be logged in to vote

Q1: keep directory structure intact

Nope, not supported.
I think Gulp does some interesting things here (which was briefly discussed before here), but how should it work?

Some examples, with the following input files:

input/a/readme.md
input/b/readme.md
readme.md
$ ./node_modules/.bin/remark -u html -o output/ input/
$ ./node_modules/.bin/remark -u html -o output/ input/ readme.md
$ ./node_modules/.bin/remark -u html -o output/ input/{a,b}
$ ./node_modules/.bin/remark -u html -o output/ **/*.md

What should the structure of output/ be?

Q2: Extensions

Plugins can change files. In the above examples, remark-html is used, which sets extnames of .html, and hence the written files will have

Replies: 1 comment 8 replies

Comment options

You must be logged in to vote
8 replies
@wooorm
Comment options

@NickSto
Comment options

@wooorm
Comment options

@janaka
Comment options

@wooorm
Comment options

Answer selected by NickSto
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
🏗 area/tools This affects tooling
3 participants