This commit is contained in:
winixt 2021-12-22 20:15:28 +08:00
commit 87961748e0
11 changed files with 15 additions and 7 deletions

View File

@ -3,7 +3,7 @@ English | [简体中文](./README.md)
<p align="center">
<a href="../../">
<img alt="fes.js" width="250" src="https://i.loli.net/2021/03/12/Vb4LKc5gaHUfOwB.png">
<img alt="fes.js" width="250" src="./images/fes-logo.png">
</a>
</p>

View File

@ -2,7 +2,7 @@
<p align="center">
<a href="../../">
<img alt="fes.js" width="250" src="https://i.loli.net/2021/03/12/Vb4LKc5gaHUfOwB.png">
<img alt="fes.js" width="250" src="./images/fes-logo.png">
</a>
</p>

Binary file not shown.

Before

Width:  |  Height:  |  Size: 33 KiB

After

Width:  |  Height:  |  Size: 50 KiB

BIN
images/fes-logo-name.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 25 KiB

BIN
images/fes-logo.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 50 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 33 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 20 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 33 KiB

After

Width:  |  Height:  |  Size: 50 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 33 KiB

After

Width:  |  Height:  |  Size: 50 KiB

View File

@ -3,6 +3,16 @@ import { join } from 'path';
import { winPath } from '@fesjs/utils';
import { runtimePath } from '../../../../utils/constants';
function getAppPath(absSrcPath) {
for (const suffix of ['.js', '.ts', '.jsm']) {
const p = winPath(join(absSrcPath, `app${suffix}`));
if (existsSync(p)) {
return p;
}
}
return null;
}
export default function (api) {
const {
paths,
@ -33,12 +43,11 @@ export default function (api) {
'onRouterCreated'
]
});
const appPath = winPath(join(paths.absSrcPath, 'app.js'));
const plugins = await api.applyPlugins({
key: 'addRuntimePlugin',
type: api.ApplyPluginsType.add,
initialValue: [
existsSync(appPath) && appPath
getAppPath(paths.absSrcPath)
].filter(Boolean)
});
api.writeTmpFile({

View File

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