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

Update docs when building a new command #5835

Open
milanholemans opened this issue Feb 10, 2024 · 6 comments · May be fixed by #5999
Open

Update docs when building a new command #5835

milanholemans opened this issue Feb 10, 2024 · 6 comments · May be fixed by #5999

Comments

@milanholemans
Copy link
Contributor

Today I was building a new command and noticed that CLI didn't recognize my new command locally. I quickly thought of something we adjusted a few weeks ago. Currently, we discover new commands only while running a new build. While we know this, this might not be that obvious for new contributors. Therefore I suggest we add to our docs an admonition that says people should run npm run build one time when they are working on a new command.

@milanholemans milanholemans added good first issue docs needs peer review Needs second pair of eyes to review the spec or PR labels Feb 10, 2024
@Adam-it
Copy link
Contributor

Adam-it commented Feb 11, 2024

Good call. Let's add this clarity 👍
It's also good to first clear before running build like
npm run clean; npm run build

@Adam-it Adam-it added help wanted and removed needs peer review Needs second pair of eyes to review the spec or PR labels Feb 11, 2024
@waldekmastykarz
Copy link
Member

Just to clarify: you mean the command was there but CLI wouldn't load its help?

Since we're writing in TypeScript, you need to build to transpile the code to JavaScript, so the need to build is obvious. But I suspect there's more to your observation so would like to clarify it before we proceed with defining a suitable a solution.

@milanholemans
Copy link
Contributor Author

milanholemans commented Feb 11, 2024

Just to clarify: you mean the command was there but CLI wouldn't load its help?

Since we're writing in TypeScript, you need to build to transpile the code to JavaScript, so the need to build is obvious. But I suspect there's more to your observation so would like to clarify it before we proceed with defining a suitable a solution.

While developing I usually use npm run watch. However when you create a new command, you are unable to test it locally because CLI says this command doesn't exist.
Only after doing an npm run build, CLI updates its command list and knows it's there.
This is because of #5608

@waldekmastykarz
Copy link
Member

waldekmastykarz commented Feb 11, 2024

While developing I usually use npm run watch. However when you create a new command, you are unable to test it locally because CLI says this command doesn't exist.

Understood. I suggest that we revisit the watch command and see if there's a different way to orchestrate it so that you get everything you get from build + watch. It doesn't make sense for watch to be incomplete.

#5608 is not the only culprit. We had the same issue for a long time, previously linked to Power Platform app templates. Now they're gone, the reason has changed, but the problem remains.

@SmitaNachan
Copy link
Contributor

Can I work on it?

@Jwaegebaert
Copy link
Contributor

All yours @SmitaNachan!

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

Successfully merging a pull request may close this issue.

5 participants