You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Add the possibility to use templates while creating layouts/pages/components/boot with quasar cli.
Currently, creating any file using the quasar cli results in some default code being generated for the file.
Some component such as QDialog almost all implement the same code. Adding the ability to specify the template
of the component at create time using a command such as quasar new component --template dialog which would result in the component being created with the code recommended here would reduce some repetitive task.
A new folder named templates could be added in the src folder allowing users to store custom templates they could use to create pages or components.
I agree with @lukadriel7. When adding a new component I've to add plenty of code which is the same across all components. Really nice example is dialog with its configuration and custom template part.
Maybe a new Quasar extension could the job for templates?
@geoidesic not only avoiding copy-paste, it could be the basis to enable users to share their own template and make it accessible to others directly from a quasar project. Kinda how extensions work but with templates. This of course being a long term objective.
I understand your point, but then again we have a command to create pages, components and layout when we could just create a new file and paste or write some code there by ourselves.
RFC (Request for Comments) Template
Please select your type of RFC (one or more):
Put an
x
in the boxes that applyOther
Does this introduce a breaking change?
Put an
x
in the box that appliesProposed RFC
Add the possibility to use templates while creating layouts/pages/components/boot with quasar cli.
Currently, creating any file using the quasar cli results in some default code being generated for the file.
Some component such as QDialog almost all implement the same code. Adding the ability to specify the template
of the component at create time using a command such as
quasar new component --template dialog
which would result in the component being created with the code recommended here would reduce some repetitive task.A new folder named templates could be added in the src folder allowing users to store custom templates they could use to create pages or components.
Possible Folder Structure
The text was updated successfully, but these errors were encountered: