Generating a stand-alone version from Node

104 views
Skip to first unread message

Scott Sauyet

unread,
May 10, 2020, 9:14:38 PM5/10/20
to TiddlyWiki
I'm guessing that there's a simple answer to this, but I'm not seeing it in the `commands` section.

Is there a straightforward way in Node to generate a stand-alone version of the all-in-one file?  In a build process, I would like to clone a Node version, dynamically create a number of documentation Tiddlers, then build the stand-alone file to be used in something like a static site.

Of course I could start the server, wait a moment and request the file.  So there's always a solution, but it feels awkward.  Is there a command that does this directly?

  -- Scott

Mark S.

unread,
May 10, 2020, 10:22:46 PM5/10/20
to TiddlyWiki

This might be something like what you want:


What isn't mentioned in those docs is that the output goes into the output directory.

Scott Sauyet

unread,
May 11, 2020, 8:06:13 AM5/11/20
to TiddlyWiki
> Scott Sauyet wrote:

Mark S. wrote:

>> Is there a straightforward way in Node to generate a stand-alone version of the all-in-one file?

> This might be something like what you want:
> What isn't mentioned in those docs is that the output goes into the output directory. 

Thank you.  That look like exactly what I want.  I'll try it out today.

  -- Scott

Scott Sauyet

unread,
May 11, 2020, 10:51:46 AM5/11/20
to TiddlyWiki
It worked.  For some reason it doesn't respect the `output` command properly, but I can live with that if I can't find a fix.

Thanks for the help.

  -- Scott

Soren Bjornstad

unread,
May 11, 2020, 5:04:20 PM5/11/20
to TiddlyWiki
The output option needs to come before any other commands you use -- TiddlyWiki executes them in the order you list them, so if you put it after the export command, it only resets the output location after the file has already been rendered. Not sure if that's your problem, but that fixed it for me when I ran into the same issue the other day.

Scott Sauyet

unread,
May 11, 2020, 5:28:56 PM5/11/20
to TiddlyWiki
Yes, that was it.  I misread it as needing to do

tiddlywiki --input path/to/folder
tiddlywiki ./Wiki --rendertiddler $:core/save/all index.html text/plain
       
in two separate commands.

When I tried to combine them, I put the --output command at the end.  Putting it first fixes it.

Thank you,

  -- Scott
Reply all
Reply to author
Forward
0 new messages