diff --git a/packages/fes-compiler/src/service/getPaths.js b/packages/fes-compiler/src/service/getPaths.js index 47cc2c45..0fccad10 100644 --- a/packages/fes-compiler/src/service/getPaths.js +++ b/packages/fes-compiler/src/service/getPaths.js @@ -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'); diff --git a/packages/fes-preset-built-in/src/plugins/features/singular.js b/packages/fes-preset-built-in/src/plugins/features/singular.js index 14cfc299..5a6915e6 100644 --- a/packages/fes-preset-built-in/src/plugins/features/singular.js +++ b/packages/fes-preset-built-in/src/plugins/features/singular.js @@ -2,7 +2,7 @@ export default (api) => { api.describe({ key: 'singular', config: { - default: true, + default: false, schema(joi) { return joi .boolean(); diff --git a/packages/fes-preset-built-in/src/utils/generateFiles.js b/packages/fes-preset-built-in/src/utils/generateFiles.js index 532e6255..7a601ebe 100644 --- a/packages/fes-preset-built-in/src/utils/generateFiles.js +++ b/packages/fes-preset-built-in/src/utils/generateFiles.js @@ -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') ] }); diff --git a/packages/fes-template-h5/src/page/index.vue b/packages/fes-template-h5/src/pages/index.vue similarity index 100% rename from packages/fes-template-h5/src/page/index.vue rename to packages/fes-template-h5/src/pages/index.vue diff --git a/packages/fes-template-h5/src/page/onepiece.vue b/packages/fes-template-h5/src/pages/onepiece.vue similarity index 100% rename from packages/fes-template-h5/src/page/onepiece.vue rename to packages/fes-template-h5/src/pages/onepiece.vue diff --git a/packages/fes-template/src/locale/en-US.js b/packages/fes-template/src/locales/en-US.js similarity index 100% rename from packages/fes-template/src/locale/en-US.js rename to packages/fes-template/src/locales/en-US.js diff --git a/packages/fes-template/src/locale/id-ID.js b/packages/fes-template/src/locales/id-ID.js similarity index 100% rename from packages/fes-template/src/locale/id-ID.js rename to packages/fes-template/src/locales/id-ID.js diff --git a/packages/fes-template/src/locale/pt-BR.js b/packages/fes-template/src/locales/pt-BR.js similarity index 100% rename from packages/fes-template/src/locale/pt-BR.js rename to packages/fes-template/src/locales/pt-BR.js diff --git a/packages/fes-template/src/locale/zh-CN.js b/packages/fes-template/src/locales/zh-CN.js similarity index 100% rename from packages/fes-template/src/locale/zh-CN.js rename to packages/fes-template/src/locales/zh-CN.js diff --git a/packages/fes-template/src/locale/zh-TW.js b/packages/fes-template/src/locales/zh-TW.js similarity index 100% rename from packages/fes-template/src/locale/zh-TW.js rename to packages/fes-template/src/locales/zh-TW.js diff --git a/packages/fes-template/src/model/user.js b/packages/fes-template/src/models/user.js similarity index 100% rename from packages/fes-template/src/model/user.js rename to packages/fes-template/src/models/user.js diff --git a/packages/fes-template/src/page/index.vue b/packages/fes-template/src/pages/index.vue similarity index 100% rename from packages/fes-template/src/page/index.vue rename to packages/fes-template/src/pages/index.vue diff --git a/packages/fes-template/src/page/onepiece.vue b/packages/fes-template/src/pages/onepiece.vue similarity index 100% rename from packages/fes-template/src/page/onepiece.vue rename to packages/fes-template/src/pages/onepiece.vue