更新打包脚本

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" "vscode": "^1.22.0"
}, },
"scripts": { "scripts": {
"build": "node build.js" "build": "node build.mjs"
}, },
"categories": [ "categories": [
"Programming Languages" "Programming Languages"

View File

@ -1,5 +1,3 @@
function html()
{
html` html`
<style> <style>
:host { :host {
@ -8,7 +6,7 @@ function html()
</style> </style>
<body> <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>
<div></div> <div></div>
@ -16,62 +14,23 @@ function html()
<h3>${['❤️', '💛', '💚', '💙', '💜', '🖤']}</h3> <h3>${['❤️', '💛', '💚', '💙', '💜', '🖤']}</h3>
</body> </body>
`; `
/* html */` bug(html` <div></div> `)
<div></div>
<div></div>
<div></div>
<div></div>
<div>
<p></p>
</div>
`;
bug(/* html*/` function bug() {
<div></div> html`div...`
`);
bug(html`
<div></div>
`);
} }
function bug()
{
html`div...`;
}
function css()
{
css` css`
:host { :host {
display: block; display: block;
} }
`; `
/* css */` css`
:host { :host {
display: block; display: block;
height: 50px; height: 50px;
} }
`; `
/* css */`
:host {
display: block;
}
`;
bug(/*css */`
:host {
display: block;
}
`)
bug(css`
:host {
display: block;
}
`)
}