Replies: 6 comments 6 replies
-
I am not sure what is easier about this than just installing tiddlywiki without the -g flag. The tiddlywiki commands require a path to the wiki folder anyway. For my computers I clone the tiddlywiki5 repo and then have the wikis in a folder next to it, like in the https://github.com/inmysocks/PluginDevelopment repo. |
Beta Was this translation helpful? Give feedback.
-
Would it work to do a local install in exactly the same way as outlined for TiddlyServer? You would then put your custom commands in the scripts object of your package.json and if you pass additional args they should be passed in. "scripts": {
"tiddlyserver": "tiddlyserver",
"tiddlywiki": "tiddlywiki",
"tiddlywiki": "tiddlywiki-production-server"
} I recently discovered that args are passed in, so Oops: It has to be
|
Beta Was this translation helpful? Give feedback.
-
If you don't want to depend on having npm installed globally, you could just write a script to make the proper calls to the different items and pass in the variables. Normally on windows npm includes such a script in |
Beta Was this translation helpful? Give feedback.
-
I have created a https://github.com/xverges/create-tiddlywiki to showcase what kind of on-boarding experience we could be having if we supported This silent 34 seconds video shows what would be the effect of running create-tiddlywiki.mp4 |
Beta Was this translation helpful? Give feedback.
-
I have updated https://github.com/xverges/create-tiddlywiki and now
I think that it provides a quite nice on-boarding experience :-) |
Beta Was this translation helpful? Give feedback.
-
Thanks @xverges @inmysocks @Arlen22. Our integration with NPM is pretty basic at the moment, and I'm very interested in understanding the benefits of more extensive integration. The ability to run code without installing it, and the Bash integration are both attractive features. Perhaps the way to proceed might be a PR that includes the associated documentation updates: the big win here would indeed seem to be the possibility of radically improving the onboarding experience. I haven't read through all of the code, but it seems like there's more than just glue; there's the code of a setup wizard, for example. Can those things be structured as ordinary TW5 commands so that they are available for people not using npm? |
Beta Was this translation helpful? Give feedback.
-
👋 Back to TiddlyWiki after several years, trying to learn again.
Once upon a time, before browsers made it hard to write to the local filesystem even for
file:
urls, the TiddlyWiki on-boarding experience was really simple and lovely. Unfortunately, now it needs to be necessarily harder. I am now finding my way in node.js-based on-boarding.As a developer, I always try to avoid global npm installs. @Arlen22's TiddlyServer (that I have come to understand should be my tool of choice to run several TiddlyWikis with on single server and port) does document a non-global install, but does make access to the
tiddlywiki
command cumbersome, and even more to execute something equivalent totiddlywiki --editions
.Bugged by this, today I learned about the
initializer
optional param tonpm init
.npm init tiddlywiki [extra params]
would executenpx create-tiddlywiki [extra params]
, where themain
of thecreate-tiddlywiki
npm package would be creating a specially craftedpackage.json
, where appropriatenpm run
scripts could be added (and bash autocompletion for them would be provided bynpm
)Would it make sense to adopt this pattern, so that users are not forced (*) to have a single version of the
tiddlywiki
command?*: I understand that they are not forced, and that knowledgeable users can use a local install
Beta Was this translation helpful? Give feedback.
All reactions