A clear and concise description of what the feature is
When running the command inside of a Strapi project (npx @strapi/sdk-plugin@latest init test) it will create the plugin at the base directory instead of ./src/plugins.
Likewise it does not provide the user the information to set within the ./config/plugins.js|.ts file
Why should this feature be included?
Make it easier for new users to start developing plugins by providing contextual help to place the plugin in the proper directory and provide hints to enable the plugin making it easier to start testing the plugin
Please provide an example for how this would work
Just some thoughts but look for the following information:
Check if package.json exists and if it contains the @strapi/strapi dependency (might be good to check version as well)
Check if ./src exists and if it does check if ./src/plugins exists, if not create the plugins directory but if no ./src is detected this might be a monorepo and default to current logic
Once the package.json check and the ./src/plugins exists, create the package in that directory and likewise provide a hint in the CLI output on how to enable the plugin.
A clear and concise description of what the feature is
When running the command inside of a Strapi project (
npx @strapi/sdk-plugin@latest init test
) it will create the plugin at the base directory instead of ./src/plugins.Likewise it does not provide the user the information to set within the
./config/plugins.js|.ts
fileWhy should this feature be included?
Make it easier for new users to start developing plugins by providing contextual help to place the plugin in the proper directory and provide hints to enable the plugin making it easier to start testing the plugin
Please provide an example for how this would work
Just some thoughts but look for the following information:
@strapi/strapi
dependency (might be good to check version as well)./src
exists and if it does check if./src/plugins
exists, if not create the plugins directory but if no./src
is detected this might be a monorepo and default to current logic./src/plugins
exists, create the package in that directory and likewise provide a hint in the CLI output on how to enable the plugin.