更新打包脚本

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