feature: add create template (#1762)

This commit is contained in:
花裤衩
2019-03-22 18:22:14 +08:00
committed by GitHub
parent a9b4467472
commit 896b7369bf
7 changed files with 181 additions and 1 deletions

9
plop-templates/utils.js Normal file
View File

@@ -0,0 +1,9 @@
exports.notEmpty = name => {
return v => {
if (!v || v.trim === '') {
return `${name} is required`
} else {
return true
}
}
}