8000 A next generation CLI · Issue #2414 · feathersjs/feathers · GitHub
[go: up one dir, main page]

Skip to content

A next generation CLI #2414

@daffl

Description

@daffl

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/_templates
  • feathers-authentication/_templates
  • authentication/_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).

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      0