create-fite-app/lib/demo-html.js

33 lines
888 B
JavaScript
Raw Normal View History

2022-10-10 19:26:24 +08:00
/**
* {}
* @author yutent<yutent.io@gmail.com>
* @date 2022/10/10 17:00:29
*/
import fs from 'iofs'
export function writeHtmlFile(file) {
fs.echo(
`<!doctype html>
<html lang="zh-CN">
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, minimum-scale=1, user-scalable=no">
<title>{{title}}</title>
<meta name="keywords" content="{{keywords}}">
<meta name="description" content="{{description}}">
2023-02-13 14:21:42 +08:00
<link rel="stylesheet" href="//jscdn.ink/@bytedo/wcui/1.0.12/css/reset-basic.css">
2023-02-13 00:20:07 +08:00
<script async src="//jscdn.ink/es-module-shims/1.6.3/es-module-shims.wasm.js"></script>
2022-10-10 19:26:24 +08:00
<script type="importmap">{{importmap}}</script>
</head>
<body>
<div class="app noselect"></div>
<script src="main.js"></script>
</body>
</html>
`,
file
)
}