dojo/cli-create-widget

Improve configuration around directory defaults

devpaul opened this issue · 1 comments

I would like to better define where files are created with this tool. It should be possible to place configuration information regarding where tests and styles should go. However most of the use cases aren't served by the configuration and it requires rather verbose CLI commands (or capitulation by the user to the default style).

Here is the use case I'd like to support.

  • Create a widget in a particular directory (e.g. src/widgets/user/view/UserView.ts).
  • Tests are created in a known location relative to the widget directory root (e.g. test/unit/widgets/user/view/UserView.ts).
  • I would like to place styles relative to the widget (e.g. src/widgets/user/view/styles/UserView.m.css) or relative to the application root with the hierarchy maintained (e.g. src/styles/widgets/user/view/UserView.m.css`).
  • Optionally I would like to add a suffix to the tests (i.e. UserView.spec.ts)

#31 may have made some headway on this feature and #34 may add additional configuration considerations such as locales and nls directory options.

The command is now used to scaffold a widget lib not create individual widgets in a project.