mirror of
https://gitee.com/fantastic-admin/basic.git
synced 2024-11-29 18:48:31 +08:00
9 lines
322 B
JavaScript
9 lines
322 B
JavaScript
const fs = require('node:fs')
|
|
|
|
module.exports = function (plop) {
|
|
plop.setWelcomeMessage('请选择需要创建的模式:')
|
|
fs.readdirSync('./plop-templates').forEach((item) => {
|
|
fs.lstatSync(`./plop-templates/${item}`).isDirectory() && plop.setGenerator(item, require(`./plop-templates/${item}/prompt`))
|
|
})
|
|
}
|