Closed nauvalazhar closed 4 years ago
@nauvalazhar Hi, I created an example in which everything works, clarify what exactly does not work for you
But, mine still not working. Can I have a full example of yours?
@nauvalazhar You can freely clone this example https://github.com/posthtml-issues/posthtml-cli-issue-326, make changes to it that reproduce your error. Feel free
@Scrum
When the root
option is enabled, it does not appear to be running. π’
I think it's because of this change.
https://github.com/posthtml/posthtml-cli/blob/2447d87d05d557ff7c079452196985850a0b8d0f/src/cfg-resolve.js#L73
I have verified the following.
inputDir
βββ parent
βββ about
βΒ Β βββ index.html
βββ fuga
βΒ Β βββ index.html
βΒ Β βββ wao
βΒ Β βββ index.html
βββ index.html
βββ other.html
Execute the following command in the current state.
node lib/cli.js inputDir/**/*.html -o outputDir --root inputDir -a
As a result, nothing is output. So I tried to make the following change.
--${ignoreSymbol}${normalizePath(path.join(path.resolve(root), file))}
++${ignoreSymbol}${normalizePath(file)}
Do the same with posthtml-cli
node lib/cli.js inputDir/**/*.html -o outputDir --root inputDir -a
I got the correct output.
outputDir
βββ parent
βββ about
βΒ Β βββ index.html
βββ fuga
βΒ Β βββ index.html
βΒ Β βββ wao
βΒ Β βββ index.html
βββ index.html
βββ other.html
I tried to make a pull request, but the test failed, so I couldn't push it. π So I'll share with you what I think is the cause of the problem ahead of time.
@nauvalazhar @turusuke Thank you, I still managed to find the problem thanks to you.
Also, pay attention to the correctness of the input files, they should not contain the folder specified in root
node lib/cli.js **/*.html -o outputDir --root inputDir -a
Hi,
I use
posthtml-cli
, when I build like this:The command doesn't output any output and doesn't compile anything.
Here is the configuration:
And here is my package.json file:
And here's my folder structure:
Thank you for making this awesome tool!