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

Add support for script comment/description #1015

Open
manzoorwanijk opened this issue Jan 15, 2024 · 3 comments
Open

Add support for script comment/description #1015

manzoorwanijk opened this issue Jan 15, 2024 · 3 comments

Comments

@manzoorwanijk
Copy link

I have been playing around with wire it and I love it!

I have always wished for package.json comments, but we don't have them even in 2024!

Many times we have commands that are too complex, and an explanation would be of great help.

What about adding a comment or description prop to the wireit scripts?

I know we can add any prop to the script object that is unrelated to wireit and wireit won't mind those, but my suggestion is primarily to have best practices in place and allow auto completions via VS Code extension.

Something like this

"wireit": {
	"cleanup": {
		"comment": "Delete the paths that are not version controlled.",
		"command": "rm -rf some/path/* && rm -rf some/other/path/* && rm -rf some/other/related/path/*"
	},
}
@rictic
Copy link
Member

rictic commented Jan 29, 2024

I like description. We could also display it when you hover over a dependency.

@vassudanagunta
Copy link

even if you just reserved the "description" key for use only by comments, without any added functionality, it would be good. I am already using "description".

Ideally the CLI should support some way to show the description for every wireit-based command, optionally showing descriptions recursively for all dependencies. Perhaps that's what should happen when one executes wireit directly, as opposed to via npm run.

@vassudanagunta
Copy link

I like description. We could also display it when you hover over a dependency.

I think description and comment are two different things. One provides a description of the command, to be shown on hover as you suggest, or via CLI as I suggested in my prior comment. But comment is a note about the implementation, perhaps a reminder to self of why it is done the non-obvious way it is done.

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

3 participants