You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
|
|
|
import {Template} from "../Template"
|
|
|
|
import {UniversalPath} from "@extollo/util"
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Template that generates a new route definition file in app/http/routes.
|
|
|
|
*/
|
|
|
|
const routes_template: Template = {
|
|
|
|
name: 'routes',
|
|
|
|
fileSuffix: '.routes.ts',
|
|
|
|
description: 'Create a file for route definitions.',
|
|
|
|
baseAppPath: ['http', 'routes'],
|
|
|
|
render(name: string, fullCanonicalName: string, targetFilePath: UniversalPath) {
|
|
|
|
return `import {Route} from "@extollo/lib"
|
|
|
|
|
|
|
|
/*
|
|
|
|
* ${name} Routes
|
|
|
|
* -------------------------------
|
|
|
|
* Put some description here.
|
|
|
|
*/
|
|
|
|
|
|
|
|
|
|
|
|
`
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
export { routes_template }
|