Skip to content
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

separate "command" key from data key #61

Open
xileftenurb opened this issue Aug 9, 2022 · 0 comments
Open

separate "command" key from data key #61

xileftenurb opened this issue Aug 9, 2022 · 0 comments

Comments

@xileftenurb
Copy link

Since all data and command are top-level, it's hard to distinguish data key (like "name", "description", etc.) from command ("parse", "discard", "move").

Also, in the current state, each new command is a backward incompatible change because you never know if someone was not using your new command name as a key for data.

My proposition would be to create a key "data" that would contain all the data you want to pollinate in your template, so the separation between data and command is clearer,
for backward compatibility sake, both using data or putting data in the top level could work for now.

An alternative solution would be to prefix all command with a character like _ and to refuse data key starting with the same character, thus again separating the domain space of the keys.

As an aside, it would also be nice to have in the readme the complete list of command keyword near the top,

This is a very nice project, hope you can keep it up!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant