diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..6e1db0f --- /dev/null +++ b/.gitignore @@ -0,0 +1,17 @@ +# 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 3rd-party dependencies like ExDoc output generated docs. +/doc + +# 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 diff --git a/Dockerfile b/Dockerfile index 370ca7c..c234fec 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1 +1,3 @@ FROM elixir + +WORKDIR /src diff --git a/README.md b/README.md new file mode 100644 index 0000000..8d460d1 --- /dev/null +++ b/README.md @@ -0,0 +1,24 @@ +# Src + +**TODO: Add description** + +## Installation + +If [available in Hex](https://hex.pm/docs/publish), the package can be installed as: + + 1. Add `src` to your list of dependencies in `mix.exs`: + + ```elixir + def deps do + [{:src, "~> 0.1.0"}] + end + ``` + + 2. Ensure `src` is started before your application: + + ```elixir + def application do + [applications: [:src]] + end + ``` + diff --git a/config/config.exs b/config/config.exs new file mode 100644 index 0000000..65b7884 --- /dev/null +++ b/config/config.exs @@ -0,0 +1,30 @@ +# This file is responsible for configuring your application +# and its dependencies with the aid of the Mix.Config module. +use Mix.Config + +# This configuration is loaded before any dependency and is restricted +# to this project. If another project depends on this project, this +# file won't be loaded nor affect the parent project. For this reason, +# if you want to provide default values for your application for +# 3rd-party users, it should be done in your "mix.exs" file. + +# You can configure for your application as: +# +# config :src, key: :value +# +# And access this configuration in your application as: +# +# Application.get_env(:src, :key) +# +# Or configure a 3rd-party app: +# +# config :logger, level: :info +# + +# It is also possible to import configuration files, relative to this +# directory. For example, you can emulate configuration per environment +# by uncommenting the line below and defining dev.exs, test.exs and such. +# Configuration from the imported file will override the ones defined +# here (which is why it is important to import them last). +# +# import_config "#{Mix.env}.exs" diff --git a/docker-compose.yml b/docker-compose.yml index 989551c..8238e7f 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -1,2 +1,4 @@ app: build: . + volumes: + - .:/src diff --git a/lib/src.ex b/lib/src.ex new file mode 100644 index 0000000..26c2517 --- /dev/null +++ b/lib/src.ex @@ -0,0 +1,2 @@ +defmodule Src do +end diff --git a/mix.exs b/mix.exs new file mode 100644 index 0000000..3f271f0 --- /dev/null +++ b/mix.exs @@ -0,0 +1,32 @@ +defmodule Src.Mixfile do + use Mix.Project + + def project do + [app: :src, + version: "0.1.0", + elixir: "~> 1.3", + build_embedded: Mix.env == :prod, + start_permanent: Mix.env == :prod, + deps: deps()] + end + + # Configuration for the OTP application + # + # Type "mix help compile.app" for more information + def application do + [applications: [:logger]] + end + + # Dependencies can be Hex packages: + # + # {:mydep, "~> 0.3.0"} + # + # Or git/path repositories: + # + # {:mydep, git: "https://github.com/elixir-lang/mydep.git", tag: "0.1.0"} + # + # Type "mix help deps" for more examples and options + defp deps do + [] + end +end diff --git a/test/src_test.exs b/test/src_test.exs new file mode 100644 index 0000000..d6c0d81 --- /dev/null +++ b/test/src_test.exs @@ -0,0 +1,8 @@ +defmodule SrcTest do + use ExUnit.Case + doctest Src + + test "the truth" do + assert 1 + 1 == 2 + 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()