Closed daffl closed 2 years ago
@daffl we should define a clear action plan for migration and rewrite. As I said in the other issue, I'll try to come up with something in the morning.
Is there a project board for feathers somewhere?
On a semi-related note: Are you planning to merge my CLI enhancements, or would you rather keep things as-is and add this functionality indirectly through use of hygen templates?
Some observations I made already:
users
being registered correctly, the corresponding model and class should be called User
though (capitalized singular form)List is not final
New CLI will be moved to the main repo and is currently being worked on in https://github.com/feathersjs/feathers/tree/hygen-cli
In general, the templates will provide a very minimal setup that can be fully customized to anything you want by running something like feathers customize app
(or feathers customize authentication
etc.) and ejecting the module specific templates into your local project.
This is now available in the v5 prerelease and can be used following the new guide at https://dove.feathersjs.com/guides. Closing this main issue, bugs and new features can be follow up with specific issues.
@daffl sorry to dig this up but was this somehow even possible in v4? or do we need to update to v5 to customize the templates?
It is not but you can create your own templates with https://github.com/featherscloud/pinion
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
Will look for templates that can be generated in the following modules:
./_templates/authentication
(locally)@feathersjs/authentication/_templates
feathers-authentication/_templates
authentication/_templates
Templates can be ejected into your application with
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).