From a52927cbd4c90c4c09e7a3a33bdf9d3cc2c0bec9 Mon Sep 17 00:00:00 2001 From: yutent Date: Mon, 5 Jun 2023 18:45:47 +0800 Subject: [PATCH] =?UTF-8?q?=E6=9B=B4=E6=96=B0=E6=89=93=E5=8C=85=E8=84=9A?= =?UTF-8?q?=E6=9C=AC?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- build.mjs | 16 +++++++++ package.json | 2 +- tests/index.js | 97 +++++++++++++++----------------------------------- 3 files changed, 45 insertions(+), 70 deletions(-) create mode 100644 build.mjs diff --git a/build.mjs b/build.mjs new file mode 100644 index 0000000..f3ff20e --- /dev/null +++ b/build.mjs @@ -0,0 +1,16 @@ +/** + * {build} + * @author yutent + * @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 +}) diff --git a/package.json b/package.json index 1b079aa..2712964 100644 --- a/package.json +++ b/package.json @@ -24,7 +24,7 @@ "vscode": "^1.22.0" }, "scripts": { - "build": "node build.js" + "build": "node build.mjs" }, "categories": [ "Programming Languages" diff --git a/tests/index.js b/tests/index.js index a2fc132..00ce34c 100644 --- a/tests/index.js +++ b/tests/index.js @@ -1,77 +1,36 @@ -function html() -{ - html` - +html` + - - this.click(e)} value="deadmau5 🐭" /> - -
-
-
+ + this.click(e)} value="deadmau5 🐭" /> -

${['❤️', '💛', '💚', '💙', '💜', '🖤']}

- - `; +
+
+
- /* html */` -
-
-
-
-
-

-
- `; +

${['❤️', '💛', '💚', '💙', '💜', '🖤']}

+ +` - bug(/* html*/` -
- `); +bug(html`
`) - bug(html` -
- `); +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; - } - `) -} \ No newline at end of file +css` + :host { + display: block; + height: 50px; + } +`