mirror of
https://github.com/fly-apps/live_beats.git
synced 2024-11-24 17:01:00 +00:00
WIP
This commit is contained in:
parent
67a291ac3a
commit
bbb9693e8c
6 changed files with 34 additions and 2705 deletions
2669
assets/package-lock.json
generated
2669
assets/package-lock.json
generated
File diff suppressed because it is too large
Load diff
|
@ -1,13 +0,0 @@
|
||||||
{
|
|
||||||
"scripts": {
|
|
||||||
"deploy": "NODE_ENV=production tailwindcss --postcss --minify -i css/app.css -o ../priv/static/assets/app.css"
|
|
||||||
},
|
|
||||||
"dependencies": {},
|
|
||||||
"devDependencies": {
|
|
||||||
"@tailwindcss/forms": "^0.3.3",
|
|
||||||
"autoprefixer": "^10.2.0",
|
|
||||||
"postcss": "^8.3.5",
|
|
||||||
"postcss-import": "^14.0.2",
|
|
||||||
"tailwindcss": "^2.2.4"
|
|
||||||
}
|
|
||||||
}
|
|
|
@ -1,7 +0,0 @@
|
||||||
module.exports = {
|
|
||||||
plugins: {
|
|
||||||
'postcss-import': {},
|
|
||||||
tailwindcss: {},
|
|
||||||
autoprefixer: {},
|
|
||||||
}
|
|
||||||
}
|
|
|
@ -1,14 +1,12 @@
|
||||||
import Config
|
import Config
|
||||||
|
|
||||||
config :live_beats, :files, [
|
config :live_beats, :files,
|
||||||
uploads_dir: Path.expand("../priv/uploads", __DIR__),
|
uploads_dir: Path.expand("../priv/uploads", __DIR__),
|
||||||
host: [scheme: "http", host: "localhost", port: 4000],
|
host: [scheme: "http", host: "localhost", port: 4000]
|
||||||
]
|
|
||||||
|
|
||||||
config :live_beats, :github, [
|
config :live_beats, :github,
|
||||||
client_id: System.fetch_env!("LIVE_BEATS_GITHUB_CLIENT_ID"),
|
client_id: System.fetch_env!("LIVE_BEATS_GITHUB_CLIENT_ID"),
|
||||||
client_secret: System.fetch_env!("LIVE_BEATS_GITHUB_CLIENT_SECRET"),
|
client_secret: System.fetch_env!("LIVE_BEATS_GITHUB_CLIENT_SECRET")
|
||||||
]
|
|
||||||
|
|
||||||
# Configure your database
|
# Configure your database
|
||||||
config :live_beats, LiveBeats.Repo,
|
config :live_beats, LiveBeats.Repo,
|
||||||
|
@ -35,14 +33,23 @@ config :live_beats, LiveBeatsWeb.Endpoint,
|
||||||
watchers: [
|
watchers: [
|
||||||
# Start the esbuild watcher by calling Esbuild.install_and_run(:default, args)
|
# Start the esbuild watcher by calling Esbuild.install_and_run(:default, args)
|
||||||
esbuild: {Esbuild, :install_and_run, [:default, ~w(--sourcemap=inline --watch)]},
|
esbuild: {Esbuild, :install_and_run, [:default, ~w(--sourcemap=inline --watch)]},
|
||||||
npx: [
|
tailwindcss:
|
||||||
"tailwindcss",
|
{LiveBeats.Tailwind, :run,
|
||||||
"--input=css/app.css",
|
[
|
||||||
"--output=../priv/static/assets/app.css",
|
[
|
||||||
"--postcss",
|
"--input=css/app.css",
|
||||||
"--watch",
|
"--output=../priv/static/assets/app.css",
|
||||||
cd: Path.expand("../assets", __DIR__)
|
"--watch"
|
||||||
]
|
]
|
||||||
|
]}
|
||||||
|
# npx: [
|
||||||
|
# "tailwindcss",
|
||||||
|
# "--input=css/app.css",
|
||||||
|
# "--output=../priv/static/assets/app.css",
|
||||||
|
# "--postcss",
|
||||||
|
# "--watch",
|
||||||
|
# cd: Path.expand("../assets", __DIR__)
|
||||||
|
# ]
|
||||||
]
|
]
|
||||||
|
|
||||||
# ## SSL Support
|
# ## SSL Support
|
||||||
|
|
13
lib/live_beats/tailwind.ex
Normal file
13
lib/live_beats/tailwind.ex
Normal file
|
@ -0,0 +1,13 @@
|
||||||
|
defmodule LiveBeats.Tailwind do
|
||||||
|
def run(args) do
|
||||||
|
opts = [
|
||||||
|
cd: IO.inspect(Path.join(File.cwd!(), "assets")),
|
||||||
|
into: IO.stream(:stdio, :line),
|
||||||
|
stderr_to_stdout: true
|
||||||
|
]
|
||||||
|
|
||||||
|
Path.expand("assets/tailwindcss-macos-x64")
|
||||||
|
|> System.cmd(args, opts)
|
||||||
|
|> elem(1)
|
||||||
|
end
|
||||||
|
end
|
|
@ -1,8 +1,6 @@
|
||||||
defmodule LiveBeatsWeb.ProfileLive.SongRowComponent do
|
defmodule LiveBeatsWeb.ProfileLive.SongRowComponent do
|
||||||
use LiveBeatsWeb, :live_component
|
use LiveBeatsWeb, :live_component
|
||||||
|
|
||||||
alias LiveBeats.MediaLibrary.Song
|
|
||||||
|
|
||||||
def send_status(song_id, status) when status in [:playing, :paused, :stopped] do
|
def send_status(song_id, status) when status in [:playing, :paused, :stopped] do
|
||||||
send_update(__MODULE__, id: "song-#{song_id}", action: :send, status: status)
|
send_update(__MODULE__, id: "song-#{song_id}", action: :send, status: status)
|
||||||
end
|
end
|
||||||
|
|
Loading…
Reference in a new issue