-
-
Notifications
You must be signed in to change notification settings - Fork 797
Description
Maintaining a fully featured single application generator has proven very difficult and time consuming. Every new feature or prompt adds an exponential growth in code and test complexity. Templates are difficult to customize since they are buried in a third party module and difficult to maintain, especially when having to account for all kinds of customizations somebody would want to do.
A more flexible approach is used by hygen.io which puts generator templates right into your application. If you want to change it, edit it to what you need and all future generator calls will reflect it.
To further improve modularity, each Feathers module will ship with the templates that can be used to generate its integration in a standard JavaScript/TypeScript Feathers setup. You can either just run it or eject the templates into your own application to customize.
For example
feathers generate authentication
Will look for templates that can be generated in the following modules:
./_templates/authentication(locally)@feathersjs/authentication/_templatesfeathers-authentication/_templatesauthentication/_templates
Templates can be ejected into your application with
feathers customize authentication
This will allow any third party module to provide templates to generate its integration into a standard Feathers application setup and any user to customize what is being being generated to fit their own application needs (like creating templates that initialize a common set of protection hooks when generating a new service).