mirror of https://git.tuxpa.in/a/code-server.git
Experimenting with FuseBox
This commit is contained in:
parent
3ec40f49bf
commit
7cfeef36a8
|
@ -1,3 +1,4 @@
|
||||||
|
.fusebox
|
||||||
lib/vscode
|
lib/vscode
|
||||||
node_modules
|
node_modules
|
||||||
dist
|
dist
|
||||||
|
|
|
@ -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();
|
|
@ -10,7 +10,7 @@
|
||||||
"vscode": "npm-run-all vscode:*",
|
"vscode": "npm-run-all vscode:*",
|
||||||
"packages:install": "cd ./packages && yarn",
|
"packages:install": "cd ./packages && yarn",
|
||||||
"postinstall": "npm-run-all --parallel vscode packages:install",
|
"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"
|
"test": "cd ./packages && yarn test"
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
|
|
|
@ -71,16 +71,6 @@
|
||||||
<div class="message">
|
<div class="message">
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<script>
|
|
||||||
const overlay = document.getElementById("overlay");
|
|
||||||
const logo = document.getElementById("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)`;
|
|
||||||
});
|
|
||||||
</script>
|
|
||||||
</body>
|
</body>
|
||||||
|
|
||||||
</html>
|
</html>
|
||||||
|
|
|
@ -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)`;
|
||||||
|
});
|
||||||
|
}
|
Loading…
Reference in New Issue