Right now the Piral instance name is decided by the base name of the used directory (target). This should be made configurable, with the current setting (base name of the used directory) being the default.
Background
Maybe the directory is a bit misleading, the package should be scoped, or similar. We should support such cases without need to edit the package.json afterwards.
Discussion
What should the parameter name be? I think --app-name (i.e., having app-name / appName) would be good.
It should be made available as options, where undefined is the default. This way, we can just assign basename(root) as default value when getting the appName from the options.
New Feature Proposal
For more information, see the
CONTRIBUTING
guide.Description
Right now the Piral instance name is decided by the base name of the used directory (target). This should be made configurable, with the current setting (base name of the used directory) being the default.
Background
Maybe the directory is a bit misleading, the package should be scoped, or similar. We should support such cases without need to edit the package.json afterwards.
Discussion
What should the parameter name be? I think
--app-name
(i.e., havingapp-name
/appName
) would be good.Implementation
Right now the project name is determined here https://github.com/smapiot/piral/blob/develop/src/tooling/piral-cli/src/apps/new-piral.ts#L138
It should be made available as options, where
undefined
is the default. This way, we can just assignbasename(root)
as default value when getting theappName
from the options.