diff --git a/.formatter.exs b/.formatter.exs new file mode 100644 index 0000000..d2cda26 --- /dev/null +++ b/.formatter.exs @@ -0,0 +1,4 @@ +# Used by "mix format" +[ + inputs: ["{mix,.formatter}.exs", "{config,lib,test}/**/*.{ex,exs}"] +] diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..1a7dddd --- /dev/null +++ b/.gitignore @@ -0,0 +1,26 @@ +# The directory Mix will write compiled artifacts to. +/_build/ + +# If you run "mix test --cover", coverage assets end up here. +/cover/ + +# The directory Mix downloads your dependencies sources to. +/deps/ + +# Where third-party dependencies like ExDoc output generated docs. +/doc/ + +# Ignore .fetch files in case you like to edit your project deps locally. +/.fetch + +# If the VM crashes, it generates a dump, let's ignore it too. +erl_crash.dump + +# Also ignore archive artifacts (built via "mix archive.build"). +*.ez + +# Ignore package tarball (built via "mix hex.build"). +jenot-*.tar + +# Temporary files, for example, from tests. +/tmp/ diff --git a/README.md b/README.md index ad16294..eed4447 100644 --- a/README.md +++ b/README.md @@ -3,6 +3,3 @@ Yet another go at a note taking app. Task list handling behavior heavily inspired by Google Keep, which is my current daily driver for all kinds of quick notes, shopping lists etc. - -The idea is to have zero or near zero dependencies for FE code, using only -standard APIs. diff --git a/lib/jenot.ex b/lib/jenot.ex new file mode 100644 index 0000000..9e3b7aa --- /dev/null +++ b/lib/jenot.ex @@ -0,0 +1,18 @@ +defmodule Jenot do + @moduledoc """ + Documentation for `Jenot`. + """ + + @doc """ + Hello world. + + ## Examples + + iex> Jenot.hello() + :world + + """ + def hello do + :world + end +end diff --git a/lib/jenot/application.ex b/lib/jenot/application.ex new file mode 100644 index 0000000..e6f41b6 --- /dev/null +++ b/lib/jenot/application.ex @@ -0,0 +1,20 @@ +defmodule Jenot.Application do + # See https://hexdocs.pm/elixir/Application.html + # for more information on OTP Applications + @moduledoc false + + use Application + + @impl true + def start(_type, _args) do + children = [ + # Starts a worker by calling: Jenot.Worker.start_link(arg) + # {Jenot.Worker, arg} + ] + + # See https://hexdocs.pm/elixir/Supervisor.html + # for other strategies and supported options + opts = [strategy: :one_for_one, name: Jenot.Supervisor] + Supervisor.start_link(children, opts) + end +end diff --git a/mix.exs b/mix.exs new file mode 100644 index 0000000..9b8fba5 --- /dev/null +++ b/mix.exs @@ -0,0 +1,29 @@ +defmodule Jenot.MixProject do + use Mix.Project + + def project do + [ + app: :jenot, + version: "0.1.0", + elixir: "~> 1.17", + start_permanent: Mix.env() == :prod, + deps: deps() + ] + end + + # Run "mix help compile.app" to learn about applications. + def application do + [ + extra_applications: [:logger], + mod: {Jenot.Application, []} + ] + end + + # Run "mix help deps" to learn about dependencies. + defp deps do + [ + # {:dep_from_hexpm, "~> 0.3.0"}, + # {:dep_from_git, git: "https://github.com/elixir-lang/my_dep.git", tag: "0.1.0"} + ] + end +end diff --git a/img/android-chrome-192x192.png b/static/img/android-chrome-192x192.png similarity index 100% rename from img/android-chrome-192x192.png rename to static/img/android-chrome-192x192.png diff --git a/img/android-chrome-512x512.png b/static/img/android-chrome-512x512.png similarity index 100% rename from img/android-chrome-512x512.png rename to static/img/android-chrome-512x512.png diff --git a/img/apple-touch-icon.png b/static/img/apple-touch-icon.png similarity index 100% rename from img/apple-touch-icon.png rename to static/img/apple-touch-icon.png diff --git a/img/favicon-16x16.png b/static/img/favicon-16x16.png similarity index 100% rename from img/favicon-16x16.png rename to static/img/favicon-16x16.png diff --git a/img/favicon-32x32.png b/static/img/favicon-32x32.png similarity index 100% rename from img/favicon-32x32.png rename to static/img/favicon-32x32.png diff --git a/img/favicon.ico b/static/img/favicon.ico similarity index 100% rename from img/favicon.ico rename to static/img/favicon.ico diff --git a/index.html b/static/index.html similarity index 100% rename from index.html rename to static/index.html diff --git a/js/caching-worker.js b/static/js/caching-worker.js similarity index 100% rename from js/caching-worker.js rename to static/js/caching-worker.js diff --git a/js/components.js b/static/js/components.js similarity index 100% rename from js/components.js rename to static/js/components.js diff --git a/js/db-store.js b/static/js/db-store.js similarity index 100% rename from js/db-store.js rename to static/js/db-store.js diff --git a/js/dom.js b/static/js/dom.js similarity index 100% rename from js/dom.js rename to static/js/dom.js diff --git a/js/jenot.js b/static/js/jenot.js similarity index 100% rename from js/jenot.js rename to static/js/jenot.js diff --git a/js/notifications.js b/static/js/notifications.js similarity index 100% rename from js/notifications.js rename to static/js/notifications.js diff --git a/js/service-worker.js b/static/js/service-worker.js similarity index 100% rename from js/service-worker.js rename to static/js/service-worker.js diff --git a/js/store.js b/static/js/store.js similarity index 100% rename from js/store.js rename to static/js/store.js diff --git a/site.webmanifest b/static/site.webmanifest similarity index 100% rename from site.webmanifest rename to static/site.webmanifest diff --git a/style.css b/static/style.css similarity index 100% rename from style.css rename to static/style.css diff --git a/test/jenot_test.exs b/test/jenot_test.exs new file mode 100644 index 0000000..af3a290 --- /dev/null +++ b/test/jenot_test.exs @@ -0,0 +1,8 @@ +defmodule JenotTest do + use ExUnit.Case + doctest Jenot + + test "greets the world" do + assert Jenot.hello() == :world + end +end diff --git a/test/test_helper.exs b/test/test_helper.exs new file mode 100644 index 0000000..869559e --- /dev/null +++ b/test/test_helper.exs @@ -0,0 +1 @@ +ExUnit.start()