This commit is contained in:
Chris McCord 2021-12-16 11:06:22 -05:00
parent 67a291ac3a
commit bbb9693e8c
6 changed files with 34 additions and 2705 deletions

2669
assets/package-lock.json generated

File diff suppressed because it is too large Load diff

View file

@ -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"
}
}

View file

@ -1,7 +0,0 @@
module.exports = {
plugins: {
'postcss-import': {},
tailwindcss: {},
autoprefixer: {},
}
}

View file

@ -1,14 +1,12 @@
import Config
config :live_beats, :files, [
config :live_beats, :files,
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_secret: System.fetch_env!("LIVE_BEATS_GITHUB_CLIENT_SECRET"),
]
client_secret: System.fetch_env!("LIVE_BEATS_GITHUB_CLIENT_SECRET")
# Configure your database
config :live_beats, LiveBeats.Repo,
@ -35,14 +33,23 @@ config :live_beats, LiveBeatsWeb.Endpoint,
watchers: [
# Start the esbuild watcher by calling Esbuild.install_and_run(:default, args)
esbuild: {Esbuild, :install_and_run, [:default, ~w(--sourcemap=inline --watch)]},
npx: [
"tailwindcss",
"--input=css/app.css",
"--output=../priv/static/assets/app.css",
"--postcss",
"--watch",
cd: Path.expand("../assets", __DIR__)
]
tailwindcss:
{LiveBeats.Tailwind, :run,
[
[
"--input=css/app.css",
"--output=../priv/static/assets/app.css",
"--watch"
]
]}
# npx: [
# "tailwindcss",
# "--input=css/app.css",
# "--output=../priv/static/assets/app.css",
# "--postcss",
# "--watch",
# cd: Path.expand("../assets", __DIR__)
# ]
]
# ## SSL Support

View 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

View file

@ -1,8 +1,6 @@
defmodule LiveBeatsWeb.ProfileLive.SongRowComponent do
use LiveBeatsWeb, :live_component
alias LiveBeats.MediaLibrary.Song
def send_status(song_id, status) when status in [:playing, :paused, :stopped] do
send_update(__MODULE__, id: "song-#{song_id}", action: :send, status: status)
end