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; + } +`