[feat]: Detect when running command inside of project and ask to use plugins directory #22
Labels
issue: enhancement
Issue suggesting an enhancement to an existing feature
severity: medium
If it breaks the basic use of the product but can be worked around
status: confirmed
Confirmed by a Strapi Team member or multiple community members
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.The text was updated successfully, but these errors were encountered: