lib/src/cli/templates/routes.ts

26 lines
509 B
TypeScript
Raw Normal View History

2021-06-03 03:36:25 +00:00
import {Template} from '../Template'
2021-06-02 01:59:40 +00:00
/**
* Template that generates a new route definition file in app/http/routes.
*/
2021-06-03 03:36:25 +00:00
const templateRoutes: Template = {
2021-06-02 01:59:40 +00:00
name: 'routes',
fileSuffix: '.routes.ts',
description: 'Create a file for route definitions.',
baseAppPath: ['http', 'routes'],
2021-06-03 03:36:25 +00:00
render(name: string) {
return `import {Route} from '@extollo/lib'
2021-06-02 01:59:40 +00:00
/*
* ${name} Routes
* -------------------------------
* Put some description here.
*/
`
2021-06-03 03:36:25 +00:00
},
2021-06-02 01:59:40 +00:00
}
2021-06-03 03:36:25 +00:00
export { templateRoutes }