feat: singular默认为复数,false!

This commit is contained in:
万纯 2020-12-31 14:18:47 +08:00
parent 60cdf2fbec
commit 48c1234725
13 changed files with 4 additions and 3 deletions

View File

@ -20,7 +20,7 @@ export default function getServicePaths({
absSrcPath = join(cwd, 'src');
}
const absPagesPath = config.singular !== false
const absPagesPath = config.singular
? join(absSrcPath, 'page')
: join(absSrcPath, 'pages');

View File

@ -2,7 +2,7 @@ export default (api) => {
api.describe({
key: 'singular',
config: {
default: true,
default: false,
schema(joi) {
return joi
.boolean();

View File

@ -42,7 +42,8 @@ export default async ({ api, watch }) => {
type: api.ApplyPluginsType.add,
initialValue: [
paths.absPagesPath,
join(paths.absSrcPath, api.config?.singular ? 'layout' : 'layouts'),
// 貌似没用到
// join(paths.absSrcPath, api.config?.singular ? 'layout' : 'layouts'),
join(paths.absSrcPath, 'app.js')
]
});