diff --git a/.gitignore b/.gitignore index 3fc94bec..65b66914 100644 --- a/.gitignore +++ b/.gitignore @@ -1,3 +1,4 @@ +.fusebox lib/vscode node_modules dist diff --git a/fuse.js b/fuse.js new file mode 100644 index 00000000..11af2484 --- /dev/null +++ b/fuse.js @@ -0,0 +1,23 @@ +const { FuseBox, SassPlugin, CSSPlugin, CSSResourcePlugin } = require("fuse-box"); + +const fuse = FuseBox.init({ + homeDir: ".", + output: "dist/$name.js", + plugins: [ + [ + SassPlugin(), + CSSResourcePlugin({ dist: "dist/css-resources" }), + CSSPlugin(), + ], + ], +}); + +fuse.dev(); + +fuse + .bundle("app") + .instructions("> packages/app/src/index.ts") + .hmr() + .watch(); + +fuse.run(); diff --git a/package.json b/package.json index 2bc755f8..038c7287 100644 --- a/package.json +++ b/package.json @@ -10,7 +10,7 @@ "vscode": "npm-run-all vscode:*", "packages:install": "cd ./packages && yarn", "postinstall": "npm-run-all --parallel vscode packages:install", - "start": "webpack-dev-server --config ./webpack.config.app.js", + "start": "node fuse.js", "test": "cd ./packages && yarn test" }, "devDependencies": { diff --git a/packages/app/src/index.html b/packages/app/src/index.html index b9ab7b46..dbd3d06a 100644 --- a/packages/app/src/index.html +++ b/packages/app/src/index.html @@ -71,16 +71,6 @@
- diff --git a/packages/app/src/index.ts b/packages/app/src/index.ts new file mode 100644 index 00000000..04cc7bed --- /dev/null +++ b/packages/app/src/index.ts @@ -0,0 +1,10 @@ +const overlay = document.getElementById("overlay"); +const logo = document.getElementById("logo"); +if (overlay && logo) { + overlay.addEventListener("mousemove", (event) => { + const xPos = ((event.clientX - logo.offsetLeft) / 24).toFixed(2); + const yPos = ((logo.offsetTop - event.clientY) / 24).toFixed(2); + + logo.style.transform = `perspective(200px) rotateX(${yPos}deg) rotateY(${xPos}deg)`; + }); +}