mirror of
https://github.com/WeBankFinTech/fes.js.git
synced 2025-04-06 03:59:53 +08:00
feat: singular默认为复数,false!
This commit is contained in:
parent
60cdf2fbec
commit
48c1234725
@ -20,7 +20,7 @@ export default function getServicePaths({
|
|||||||
absSrcPath = join(cwd, 'src');
|
absSrcPath = join(cwd, 'src');
|
||||||
}
|
}
|
||||||
|
|
||||||
const absPagesPath = config.singular !== false
|
const absPagesPath = config.singular
|
||||||
? join(absSrcPath, 'page')
|
? join(absSrcPath, 'page')
|
||||||
: join(absSrcPath, 'pages');
|
: join(absSrcPath, 'pages');
|
||||||
|
|
||||||
|
@ -2,7 +2,7 @@ export default (api) => {
|
|||||||
api.describe({
|
api.describe({
|
||||||
key: 'singular',
|
key: 'singular',
|
||||||
config: {
|
config: {
|
||||||
default: true,
|
default: false,
|
||||||
schema(joi) {
|
schema(joi) {
|
||||||
return joi
|
return joi
|
||||||
.boolean();
|
.boolean();
|
||||||
|
@ -42,7 +42,8 @@ export default async ({ api, watch }) => {
|
|||||||
type: api.ApplyPluginsType.add,
|
type: api.ApplyPluginsType.add,
|
||||||
initialValue: [
|
initialValue: [
|
||||||
paths.absPagesPath,
|
paths.absPagesPath,
|
||||||
join(paths.absSrcPath, api.config?.singular ? 'layout' : 'layouts'),
|
// 貌似没用到
|
||||||
|
// join(paths.absSrcPath, api.config?.singular ? 'layout' : 'layouts'),
|
||||||
join(paths.absSrcPath, 'app.js')
|
join(paths.absSrcPath, 'app.js')
|
||||||
]
|
]
|
||||||
});
|
});
|
||||||
|
Loading…
x
Reference in New Issue
Block a user