Closed stoeffel closed 9 years ago
@tomekwi is there a way to add a newline after the last content between the inject
-tags?
To avoid this:
maybe we could add a custom footer/header to doxie.inject or a beforeAll afterAll option.
So far nothing was added. I treated newline as many Unix programs – as End Of Line. So if your docs end with a newline, there is a newline.
But I guess I’ll add a check for that – and if the docs don’t end with a newline, I’ll add one. I think cat
does the same thing.
beforeAll and afterAll could be another plugin. It’s very simple to do, just emit some docs at the beginning or end, like:
{
output: "This will be at the end"
}
:checkered_flag:
Two commits from @tomekwi sneaked there way in there. Do you guys mind??? Otherwise this is good to go and can be changed later to remove the list/newline workaround.
Looks great to me!
hmmm... I don't like the index approach. I think the only usecase is to inser content before or after the rendered content.
--insert '\n' afterContent
Then we’ll start minimal. Just --insert '\n'
. It’s easy to add options later, harder to take them away.
Then we’ll start minimal. Just --insert '\n'. It’s easy to add options later, harder to take them away.
SGTM
will rebase once again asap. :smile_cat:
rebased. can we merge this? @npm-scripts/owners
Done :+1:
Thank you!
@stoeffel @hemanth I’ve made doxie.append today. Here’s the thing at work: https://github.com/studio-b12/mve/blob/b1d7209/package.json#L17.
Nice, is there any way to avoid that echo '[]' |
?
At the moment not :(. doxie expects a JSON array over stdin – so if you call it without passing a string it switches into interactive input.
There is one reasonable option to prevent this – write another CLI for doxie-core which pipes an empty array into it.
:8ball:
adds
npm run generate
andnpm run create-toc