defmodule Needle.New.Generators.Shared do @moduledoc false use Needle.New.Generator alias Needle.New.Project template(:ctx_base_single, [ {:ctx_app, :eex, "needle_single/lib//supervisor.ex"} ]) template(:ctx_base_umbrella, [ {:root_app, :eex, "needle_umbrella/apps//README.md"}, {:root_app, :eex, "needle_umbrella/apps//mix.exs"}, {:root_app, :eex, "needle_umbrella/apps//formatter.exs", filename: ".formatter.exs"}, {:root_app, :eex, "needle_umbrella/apps//gitignore", filename: ".gitignore"}, {:root_app, :eex, "needle_umbrella/apps//lib//application.ex"}, {:root_app, :eex, "needle_umbrella/apps//test/test_helper.exs"} ]) template(:ctx, [ {:ctx_app, :eex, "needle_ctx/lib/.ex"}, {:ctx_app, :eex, "needle_ctx/lib//telemetry.ex"}, {:root_app, :config, "needle_ctx/config/config.exs"}, {:root_app, :config, "needle_ctx/config/dev.exs"}, {:root_app, :config, "needle_ctx/config/prod.exs"}, {:root_app, :config, "needle_ctx/config/test.exs"}, {:root_app, :config_prod, "needle_ctx/config/runtime.exs"} ]) template(:ecto, [ {:ctx_app, :eex, "needle_ctx/lib//repo.ex"}, {:ctx_app, :dir, "needle_ctx/priv/repo/migrations"}, {:ctx_app, :eex, "needle_ctx/priv/repo/migrations/formatter.exs", filename: ".formatter.exs"}, {:ctx_app, :eex, "needle_ctx/priv/repo/seeds.exs"}, {:ctx_app, :eex, "needle_ctx/test/support/data_case.ex"} ]) template(:mailer, [ {:ctx_app, :eex, "needle_ctx/lib//mailer.ex"} ]) template(:web_base_single, [ {:web_app, :eex, "needle_single/lib//supervisor.ex"} ]) template(:web_base_umbrella, [ {:root_app, :eex, "needle_umbrella/apps//README.md"}, {:root_app, :eex, "needle_umbrella/apps//mix.exs"}, {:root_app, :eex, "needle_umbrella/apps//formatter.exs", filename: ".formatter.exs"}, {:root_app, :eex, "needle_umbrella/apps//gitignore", filename: ".gitignore"}, {:root_app, :eex, "needle_umbrella/apps//lib//application.ex"}, {:root_app, :eex, "needle_umbrella/apps//test/test_helper.exs"} ]) template(:web, [ {:web_app, :eex, "needle_web/lib/.ex"}, {:web_app, :eex, "needle_web/lib//telemetry.ex"}, {:web_app, :eex, "needle_web/lib//endpoint.ex"}, {:web_app, :eex, "needle_web/lib//router.ex"}, {:web_app, :dir, "needle_web/lib//controllers"}, {:web_app, :eex, "needle_web/lib//controllers/error_json.ex"}, {:web_app, :eex, "needle_web/test/support/conn_case.ex"}, {:web_app, :dir, "needle_web/test//controllers"}, {:web_app, :eex, "needle_web/test//controllers/error_json_test.exs"}, {:root_app, :config, "needle_web/config/config.exs"}, {:root_app, :config, "needle_web/config/dev.exs"}, {:root_app, :config, "needle_web/config/prod.exs"}, {:root_app, :config, "needle_web/config/test.exs"}, {:root_app, :config_prod, "needle_web/config/runtime.exs"} ]) template(:assets, [ {:web_app, :eex, "needle_web/assets/package.json"}, {:web_app, :eex, "needle_web/assets/app.js"}, {:web_app, :txt, "needle_web/assets/README.md"}, {:web_app, :txt, "needle_web/assets/vite.config.js"}, {:web_app, :txt, "needle_web/assets/tailwind.config.js"}, {:web_app, :txt, "needle_web/assets/public/favicon.ico"}, {:web_app, :txt, "needle_web/assets/public/robots.txt"}, {:web_app, :txt, "needle_web/assets/public/images/gitkeep", filename: ".gitkeep"}, {:web_app, :txt, "needle_web/assets/lib/phoenix/index.js"}, {:web_app, :txt, "needle_web/assets/lib/phoenix/live_reload.css"}, {:web_app, :txt, "needle_web/assets/lib/tailwind/index.css"}, {:web_app, :txt, "needle_web/assets/lib/tailwind/colors.js"} ]) template(:html, [ {:web_app, :eex, "needle_web/lib//components/layouts.ex"}, {:web_app, :eex, "needle_web/lib//components/layouts/root.html.heex"}, {:web_app, :eex, "needle_web/lib//components/layouts/app.html.heex"}, {:web_app, :eex, "needle_web/lib//components/core_components.ex"}, {:web_app, :eex, "needle_web/lib//controllers/page_controller.ex"}, {:web_app, :eex, "needle_web/lib//controllers/page_html.ex"}, {:web_app, :eex, "needle_web/lib//controllers/page_html/home.html.heex"}, {:web_app, :eex, "needle_web/lib//controllers/error_html.ex"}, {:web_app, :eex, "needle_web/test//controllers/page_controller_test.exs"}, {:web_app, :eex, "needle_web/test//controllers/error_html_test.exs"} ]) template(:live, [ {:web_app, :txt, "needle_web/assets/lib/phoenix_live_view/index.js"} ]) template(:gettext, [ {:web_app, :eex, "needle_web/lib//gettext.ex"}, {:web_app, :eex, "needle_web/priv/gettext/en/LC_MESSAGES/errors.po"}, {:web_app, :eex, "needle_web/priv/gettext/errors.pot"} ]) @impl true def prepare_project(%Project{} = _project) do raise RuntimeError, "use patch/2, instead of this function" end @impl true def generate(%Project{} = _project) do raise RuntimeError, "use patch/2, instead of this function" end def patch(%Project{} = project, name) do copy_from(project, __MODULE__, name) end end