From e4c6629f1fd13bf9690c296e41bde3c064ad1caa Mon Sep 17 00:00:00 2001 From: blue Date: Sun, 18 Nov 2018 13:07:36 +0300 Subject: [PATCH] experimenting with imports --- main.js | 3 +++ painting/shape.js | 7 +++++++ 2 files changed, 10 insertions(+) create mode 100644 painting/shape.js diff --git a/main.js b/main.js index fc3ab02..0f43569 100644 --- a/main.js +++ b/main.js @@ -1,2 +1,5 @@ +import defaultExport from "painting/shape.js" document.getElementById("main").innerText = "Yep"; + +let s1 = new Shape(); diff --git a/painting/shape.js b/painting/shape.js new file mode 100644 index 0000000..fadf35b --- /dev/null +++ b/painting/shape.js @@ -0,0 +1,7 @@ +class Shape { + constructor() { + window.document.getElementById("main").innerHTML = "Works"; + } +} + +export default Shape;