Skip to content

Add checking availability Execute ember-cli command#41

Open
kaermorchen wants to merge 1 commit intolifeart:masterfrom
kaermorchen:add-check-execute-command
Open

Add checking availability Execute ember-cli command#41
kaermorchen wants to merge 1 commit intolifeart:masterfrom
kaermorchen:add-check-execute-command

Conversation

@kaermorchen
Copy link

This PR checks that the ember-fast-cli package is installed or not and shows the command Ember: Execute ember-cli command or doesn't.


export async function packageAvailable(packageName: string): Promise<boolean> {
const files = await workspace.findFiles(
`**/node_modules/${packageName}/package.json`,
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It may be incorrect path in case of monorepos, pnpm & such.
Likely, we need to get information about available ember addons from project (from uELS)
https://github.com/lifeart/ember-language-server/blob/component-context-info-origin/src/project.ts#L40

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Roger that.

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

Successfully merging this pull request may close these issues.

2 participants