mirror of
https://github.com/SukkaW/Surge.git
synced 2025-12-14 02:00:37 +08:00
Chore: add README to the dist
This commit is contained in:
parent
d4946aa8cc
commit
81564a1193
@ -49,7 +49,8 @@ export const buildPublic = task(require.main === module, __filename)(async (span
|
|||||||
.traceChild('generate index.html')
|
.traceChild('generate index.html')
|
||||||
.traceAsyncFn(() => treeDir(PUBLIC_DIR).then(generateHtml));
|
.traceAsyncFn(() => treeDir(PUBLIC_DIR).then(generateHtml));
|
||||||
|
|
||||||
await compareAndWriteFile(
|
await Promise.all([
|
||||||
|
compareAndWriteFile(
|
||||||
span,
|
span,
|
||||||
[
|
[
|
||||||
'/*',
|
'/*',
|
||||||
@ -64,9 +65,8 @@ export const buildPublic = task(require.main === module, __filename)(async (span
|
|||||||
' content-type: text/plain; charset=utf-8'
|
' content-type: text/plain; charset=utf-8'
|
||||||
],
|
],
|
||||||
path.join(PUBLIC_DIR, '_headers')
|
path.join(PUBLIC_DIR, '_headers')
|
||||||
);
|
),
|
||||||
|
compareAndWriteFile(
|
||||||
await compareAndWriteFile(
|
|
||||||
span,
|
span,
|
||||||
[
|
[
|
||||||
'# <pre>',
|
'# <pre>',
|
||||||
@ -75,7 +75,15 @@ export const buildPublic = task(require.main === module, __filename)(async (span
|
|||||||
'################## EOF ##################</pre>'
|
'################## EOF ##################</pre>'
|
||||||
],
|
],
|
||||||
path.join(PUBLIC_DIR, '404.html')
|
path.join(PUBLIC_DIR, '404.html')
|
||||||
);
|
),
|
||||||
|
compareAndWriteFile(
|
||||||
|
span,
|
||||||
|
[
|
||||||
|
'# The source code is located at [Sukkaw/Surge](https://github.com/Sukkaw/Surge)'
|
||||||
|
],
|
||||||
|
path.join(PUBLIC_DIR, 'README.md')
|
||||||
|
)
|
||||||
|
]);
|
||||||
|
|
||||||
return writeFile(path.join(PUBLIC_DIR, 'index.html'), html);
|
return writeFile(path.join(PUBLIC_DIR, 'index.html'), html);
|
||||||
});
|
});
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user