Toolkit: Deprecate component:create command (#56086)

* Mark component:create as deprecated

* Update message

* Update packages/grafana-toolkit/src/cli/index.ts

Co-authored-by: Jack Westbrook <jack.westbrook@gmail.com>

* Add alternative message

Co-authored-by: Jack Westbrook <jack.westbrook@gmail.com>
This commit is contained in:
Esteban Beltran 2022-10-04 09:43:24 +02:00 committed by GitHub
parent 7b93d85a85
commit 25bb926a0a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -103,9 +103,15 @@ export const run = (includeInternalScripts = false) => {
program
.command('component:create')
.description(
'Scaffold React components. Optionally add test, story and .mdx files. The components are created in the same dir the script is run from.'
'[deprecated] Scaffold React components. Optionally add test, story and .mdx files. The components are created in the same dir the script is run from.'
)
.action(async () => {
chalk.yellow.bold(
`⚠️ This command is deprecated and will be removed in v10. No further support will be provided. ⚠️`
);
console.log(
'if you were reliant on this command we recommend https://www.npmjs.com/package/react-gen-component'
);
await execTask(componentCreateTask)({});
});
}