更新打包脚本

develop
yutent 2023-06-05 18:45:47 +08:00
parent 494b9f68e5
commit a52927cbd4
3 changed files with 45 additions and 70 deletions

16
build.mjs Normal file
View File

@ -0,0 +1,16 @@
/**
* {build}
* @author yutent<yutent.io@gmail.com>
* @date 2021/08/09 11:59:41
*/
import Es from 'esbuild'
import fs from 'iofs'
Es.build({
entryPoints: fs.ls('./src', true).filter(it => fs.isfile(it)),
outdir: 'dist',
target: 'es6',
format: 'cjs'
// minify: true
})

View File

@ -24,7 +24,7 @@
"vscode": "^1.22.0"
},
"scripts": {
"build": "node build.js"
"build": "node build.mjs"
},
"categories": [
"Programming Languages"

View File

@ -1,6 +1,4 @@
function html()
{
html`
html`
<style>
:host {
display: block;
@ -8,7 +6,7 @@ function html()
</style>
<body>
<input type="button" @click=${(e) => this.click(e)} value="deadmau5 🐭" />
<input type="button" @click=${e => this.click(e)} value="deadmau5 🐭" />
<div></div>
<div></div>
@ -16,62 +14,23 @@ function html()
<h3>${['❤️', '💛', '💚', '💙', '💜', '🖤']}</h3>
</body>
`;
`
/* html */`
<div></div>
<div></div>
<div></div>
<div></div>
<div>
<p></p>
</div>
`;
bug(html` <div></div> `)
bug(/* html*/`
<div></div>
`);
bug(html`
<div></div>
`);
function bug() {
html`div...`
}
function bug()
{
html`div...`;
}
function css()
{
css`
css`
:host {
display: block;
}
`;
`
/* css */`
css`
:host {
display: block;
height: 50px;
}
`;
/* css */`
:host {
display: block;
}
`;
bug(/*css */`
:host {
display: block;
}
`)
bug(css`
:host {
display: block;
}
`)
}
`