This repository has been archived on 2024-06-16. You can view files and clone it, but cannot push or open issues or pull requests.
mebe-2/lib/mix/tasks/mebe.serve.ex

26 lines
650 B
Elixir
Raw Normal View History

2018-10-15 19:47:05 +00:00
defmodule Mix.Tasks.Mebe.Serve do
use MBU.BuildTask, auto_path: false, create_out_path: false
import MBU.TaskUtils
@shortdoc "Start Mebe2 server and frontend development tools"
@deps ["mebe.build.frontend"]
2018-10-15 19:47:05 +00:00
task _ do
[
watch(
"Frontend TS",
Path.join([File.cwd!(), "lib", "web", "frontend", "src"]),
Mix.Tasks.Mebe.Build.Frontend
),
watch(
"Frontend assets",
Path.join([File.cwd!(), "lib", "web", "frontend", "assets"]),
Mix.Tasks.Mebe.Build.Frontend
),
2018-10-15 19:47:05 +00:00
exec(System.find_executable("mix"), ["run", "--no-halt"])
]
|> listen(watch: true)
end
end