boltex / leojs

Leo Literate Editor with Outline in Typescript
https://marketplace.visualstudio.com/items?itemName=boltex.leojs
MIT License
25 stars 1 forks source link

Organize package.json with child nodes #10

Closed edreamleo closed 1 year ago

edreamleo commented 3 years ago

See PR #23 for the ekr-scripts2 branch.

package.json contains a lot of data. Make the JSON as Leonine as possible by adding separate nodes for various entries.

After running these scripts, it will be easy to alphabetize nodes and organize them with organizer nodes.

boltex commented 3 years ago

Some information about the package.json file:

package.json, although not containing any code, is still a major cornerstone of the extension for the GUI side of things.

It defines available commands, and their visibility/availability (in the command palette or actual placement and shown/hidden conditions) of any icons, along with the available keybindings for most of them.

Most importantly, commands in package.json are defined differently for being invoked with focus at either the outline pane, or the body pane, as it is the most (maybe only) reliable way to distinguish exact focus placement as a command is invoked. The "_fo" suffix is used in the case of commands detected as being invoked with focus in the outline pane, "fo" meaning "From Outline".

Note: Leo's keybindings have no interest to be detected while focus is on any other of vscode's gui controls, except in some rare occasions.

edreamleo commented 3 years ago

@boltex Thanks for your comment. Without your comment, I would not have noticed the suffix, and would have had no idea that focus mediates the data.

boltex commented 3 years ago

oops I didnt notice this from my filters in vscode, and did it on another branch!

boltex commented 1 year ago

Those sections have been split since Dec 2020, (Nice scripts by the way, thanks to @edreamleo !)

I just seem to have forgotten to close this issue.