Editor
Template editor to create and edit templates.
Create a template
-
Select project from top left dropdown.
-
Create a new template in a template group from 'Add new template' button.
-
Select template type. (Add, Modify)
Template types
- Add: Add a new file to the project.
- Modify: Modify an existing file in the project.
- When you select modify, there will be a identifier field.
- Identifier can be a comment in your file.
- Example:
// Add a routes here
- Derived will find comment in your file and add the template code above the identifier.
Example modify case
- Existing file:
routes.ts
- Template: identifier:
// Add a routes here
- Result:
Live Preview
You can preview the template output while creating the template.
Error Detection
Derived will detect and show you the errors in the template editor.
Auto-completion
Derived will auto-complete the template code based on the data source. And available functions.
Change Data Source
To see template behavior with different data source, you can change the data source.
Folder Structure Preview
Folder structure on the left side of the editor will be created dynamically based on the template paths.
Example
Templates with paths:
src/routes/{{.schema.name}}Controller.ts
src/routes/{{.schema.name}}Service.ts
src/routes/{{.schema.name}}Routes.ts
Resolved folder structure:
userController.ts
userService.ts
userRoutes.ts