From 4b466981238d135ab71492f37d3ac78e11e90a8d Mon Sep 17 00:00:00 2001 From: Tom Gao Date: Tue, 19 Dec 2023 19:25:32 +0800 Subject: [PATCH] feat: include template.ts --- .gitignore | 1 - scripts/template.ts | 2 +- src/template.ts | 142 ++++++++++++++++++++++++++++++++++++++++++++ 3 files changed, 143 insertions(+), 2 deletions(-) create mode 100644 src/template.ts diff --git a/.gitignore b/.gitignore index 907d465..64b5ef5 100644 --- a/.gitignore +++ b/.gitignore @@ -57,4 +57,3 @@ tsconfig.tsbuildinfo build dist release -src/template.ts diff --git a/scripts/template.ts b/scripts/template.ts index 085ee0f..5ea208f 100644 --- a/scripts/template.ts +++ b/scripts/template.ts @@ -12,7 +12,7 @@ function minifyHtml() { const html = fs.readFileSync(SRC, 'utf8'); - fs.writeFileSync(DEST, `export default \`${html}\`;\n`, { encoding: 'utf8' }); + fs.writeFileSync(DEST, `export default /* html */ \`${html}\`;\n`, { encoding: 'utf8' }); console.log('minified template.html successfully!'); } diff --git a/src/template.ts b/src/template.ts new file mode 100644 index 0000000..5fc7b02 --- /dev/null +++ b/src/template.ts @@ -0,0 +1,142 @@ +export default /* html */ ` + + + + + + + + + + + +
+ +
+ + +`;