rsnext/turbo/generators/helpers.ts
Thomas Knickman 348c550120
feat(turbo): use turbo gen instead of plop (#53684)
### What?

Use [Turborepo generators](https://turbo.build/repo/docs/core-concepts/monorepos/code-generation#custom-generators) instead of plop. 

Turborepo generators are built on top of plop, but include some additional tooling to make working in monorepos easier. It also supports zero config typescript for configs. 

### Why?
Same Team!

### How?
Ported the existing plopfile to a turbo generator config


Co-authored-by: Jiachi Liu <4800338+huozhi@users.noreply.github.com>
2023-11-03 01:25:18 +00:00

9 lines
230 B
TypeScript

import type { NodePlopAPI } from 'node-plop'
export function toFileName(str: string) {
return str.toLowerCase().replace(/ /g, '-')
}
export function init(plop: NodePlopAPI): void {
plop.setHelper('toFileName', toFileName)
}