-
Notifications
You must be signed in to change notification settings - Fork 1.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add some new scripts to package.json, to make npm run command easier #8294
Conversation
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks @pmario I am very much in favour of improving the core package.json scripts.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks @pmario these are powerful extensions, but do make the package.json file harder to read overall. I suppose that means that we'll need very good documentation here
The structure changed completely.
pluginlibrary is missing, because we need to handle the PR: Make pluginlibrary edition consistent with all other editions #8265 first multiwikiserver is missing since it does not have a share has no tiddlers/ directory so it's missing too - I don't know what to do with it If I clone a new repo, one of the first things I usually do is run Since wiki:info is the first thing, we do get some help info, without running any commands. So for most users that will be enough info to get going. If they run Everything needed is there now, to be selected with the mouse and "copy / pasted" into the command line. A similar output is created for @Jermolene -- what do you think? |
I think that is too obscure. Can we use "server" instead?
If we cater for external-js then perhaps we should also cater for lazy loading?
I think you've got a blank folder there because at some point in the past you've checked out the multi-wiki-support branch, and then weirdly when you check out a different branch, git seems not to remove the directory.
That edition is just a wrapper around the "share" plugin, and doesn't need any tiddlers. |
Just an info: Problems with missing |
Possible commands are
|
Updated screenshot in last post. Moved |
I do have no idea how lazy loading works and how to set it up. @linonetwo can you make suggestions here? @linonetwo ... In general, what do you think? |
Sure, I use lazy-loading everyday. Simply add a rootTiddler will enable lazy loading Try add
or this, so there are existing tiddlers:
|
I think it makes sense to document them along with the other command line details in tw5.com. |
In terms of which Node.js versions that we target, perhaps it would make sense to adopt the policy to target the oldest LTS version of Node.js, which would currently be Node.js 18. That's the version used by our CI tests, as it happens. We could still have an npm script that uses |
I think we should target the oldest active LTS version which would be Node.js 20.x. The maintenance time for 18.x ends in April 2025.. If we start to switch version at that date we have no time left to deal with any problems in the next version. Schedule see: https://nodejs.org/en/about/previous-releases#release-schedule |
@Jermolene @saqimtiaz ... I did add The problem I see is, that the client is not notified, that there is a new server running. But the command seems to work |
@Jermolene -- IMO this one can be merged for further testing. -- It only will affect developers -- So users should have no problems |
Converted to draft -- It does not work for me anymore. |
Sorry had a typo in the command line :/ Everything is OK |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hi @pmario there's a lot going on here, and the net effect is to make our package.json file much longer and more complex. It's not clear why some commands use colon as a separator, some use period, and some use dashes.
We should add some documentation for these npm commands, and transclude it into the readme shown on GitHub.
|
If do so, then there is no need to put them in fields like |
@Jermolene -- It seems your concern is, that this PR makes the package.json way to complex. That's because the edition and -server directory naming is not consistent. Some editions have it's own -server configuration for testing and some editions do not. Having an eg: If every edition would have it's own -server configuration it would probably shorten the possible new lines in package.json by 30% or 40% But that would mean, that the editions directory would contain a lot more subdirectories. The change would be backwards compatible, since the -server directories would be new. The only directory which would need a name change is the I did not suggest these changes since they would introduce many more edition subdirectories. So it would probably increase the complexity there. But imo it would be much more consistent, which is a good thing. |
@Jermolene We only need a decision. |
close this one. "merge master" did mess it up :/ |
@pmario Signatures to the CLA must target the 'tiddlywiki-com' branch. |
It happens to me frequently too, maddening |
@Jermolene -- I just found out that the changes I did create with this PR would have only worked with Windows :( I'll create a new discussion with a proposal soon. |
Ouch. I think we hit the same block with some earlier experiments a few years ago. It suggests that we should prefer our tooling to be within TW itself. As you noted in another ticket, our For example, at the moment we define commands as arrays of strings, but we could intersperse more complex JSON structures that for example permit any argument to be wikified. For example:
We could have interactive nodes that prompt the user for a string at run time. |
I think it's actually relatively simple. It doesn't touch any other subsystems. The basic functionality already exists and there wouldn't be any backwards compatibility concerns. |
With respect to VSCode integration, I've no objection to introducing a VSCode-specific configuration file in the repo. |
I've started an initial implementation in this branch: https://github.com/TiddlyWiki/TiddlyWiki5/tree/dynamic-build-commands There is support for command tokens being wikified or being treated as a filter. I intend to add a way to prompt the user for a string. We might even explore extending this JSON language to permit setting variables that can be referenced in later tokens. No doubt the documentation will be the hard part. |
add some new scripts to package.json, to make npm run command easier