Skip to content

Commit

Permalink
use ts and webpack
Browse files Browse the repository at this point in the history
  • Loading branch information
s956142 committed Apr 19, 2024
1 parent dff0057 commit 9ec43d2
Show file tree
Hide file tree
Showing 11 changed files with 4,722 additions and 191 deletions.
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
node_modules/
dist/
File renamed without changes.
27 changes: 27 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
{
"name": "tetris-battle",
"version": "1.0.0",
"description": "forFun",
"main": "index.js",
"repository": "https://github.com/s956142/tetris-battle.git",
"author": "Benson Cho <[email protected]>",
"license": "MIT",
"scripts": {
"build": "webpack --mode=production --node-env=production",
"build:dev": "webpack --mode=development",
"build:prod": "webpack --mode=production --node-env=production",
"watch": "webpack --watch"
},
"devDependencies": {
"@types/jquery": "^3.5.29",
"@webpack-cli/generators": "^3.0.7",
"clean-webpack-plugin": "^4.0.0",
"copy-webpack-plugin": "^12.0.2",
"html-webpack-plugin": "^5.6.0",
"typescript": "^5.4.5",
"webpack": "^5.91.0"
},
"dependencies": {
"ts-loader": "^9.5.1"
}
}
File renamed without changes
Binary file added public/img/tetris.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
8 changes: 4 additions & 4 deletions index.html → src/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,8 @@
<html>
<head>
<meta charset="utf-8" />
<script src="jquery-1.10.2.min.js"></script>
<script src="./lib/js/jquery-1.10.2.min.js"></script>
<link rel="icon" href="./img/tetris.png" type="image/x-icon">
<style>
#canvas {
width: 300px;
Expand Down Expand Up @@ -83,7 +84,7 @@
<div class="fs-0">
<div class="inline-div">
<canvas id="canvas" width="310" height="620"></canvas>
<img id="game-over" src="gameOver.png" />
<img id="game-over" src="./img/gameOver.png" />
<div class="fs-16">
<button id="pause">暫停</button>
<button id="continue">繼續</button>
Expand Down Expand Up @@ -124,7 +125,6 @@
</div>
</div>
<div class="mt-10 flex-row align-center ">

<span class="mr-2">速降:</span>
<span> space</span>
</div>
Expand All @@ -133,6 +133,6 @@

</div>
</div>
<script src="index.js"></script>
<script src="./index.js"></script>
</body>
</html>
Loading

0 comments on commit 9ec43d2

Please sign in to comment.