mirror of
https://github.com/danbee/chess
synced 2025-03-04 08:39:06 +00:00
Compare commits
3 Commits
43d59cc24f
...
72e3d5ea65
| Author | SHA1 | Date | |
|---|---|---|---|
| 72e3d5ea65 | |||
| 8026e8ccec | |||
| 278025b098 |
3
bin/server
Executable file
3
bin/server
Executable file
@ -0,0 +1,3 @@
|
|||||||
|
#!/bin/sh
|
||||||
|
|
||||||
|
mix phx.server
|
||||||
@ -39,7 +39,7 @@ config :esbuild,
|
|||||||
version: "0.19.4",
|
version: "0.19.4",
|
||||||
default: [
|
default: [
|
||||||
args:
|
args:
|
||||||
~w(js/app.js --bundle --target=es2017 --outdir=../priv/static/js --external:/fonts/* --external:/images/* --loader:.js=jsx),
|
~w(js/app.js --bundle --target=es2017 --outdir=../priv/static/js --external:/fonts/* --external:/images/*),
|
||||||
cd: Path.expand("../assets", __DIR__),
|
cd: Path.expand("../assets", __DIR__),
|
||||||
env: %{"NODE_PATH" => Path.expand("../deps", __DIR__)}
|
env: %{"NODE_PATH" => Path.expand("../deps", __DIR__)}
|
||||||
]
|
]
|
||||||
|
|||||||
@ -75,6 +75,8 @@ defmodule ChessWeb.BoardLive do
|
|||||||
_ ->
|
_ ->
|
||||||
handle_move(socket, file, rank)
|
handle_move(socket, file, rank)
|
||||||
end
|
end
|
||||||
|
else
|
||||||
|
[]
|
||||||
end
|
end
|
||||||
|
|
||||||
assign(socket, assigns)
|
assign(socket, assigns)
|
||||||
@ -121,6 +123,9 @@ defmodule ChessWeb.BoardLive do
|
|||||||
{:board, game.board},
|
{:board, game.board},
|
||||||
{:game, game}
|
{:game, game}
|
||||||
]
|
]
|
||||||
|
|
||||||
|
{:error, _, _, _} ->
|
||||||
|
[]
|
||||||
end
|
end
|
||||||
else
|
else
|
||||||
[{:selected, nil}, {:available, []}]
|
[{:selected, nil}, {:available, []}]
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user