更新打包脚本

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,77 +1,36 @@
function html() html`
{ <style>
html` :host {
<style> display: block;
:host { }
display: block; </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>
<div></div> <div></div>
<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() css`
{ :host {
html`div...`; display: block;
} }
`
function css() css`
{ :host {
css` display: block;
:host { height: 50px;
display: block; }
} `
`;
/* css */`
:host {
display: block;
height: 50px;
}
`;
/* css */`
:host {
display: block;
}
`;
bug(/*css */`
:host {
display: block;
}
`)
bug(css`
:host {
display: block;
}
`)
}