mirror of
https://github.com/Xevion/exercism.git
synced 2025-12-15 08:11:47 -06:00
add hello world properly, add rna-transcription (elixir is neat!)
This commit is contained in:
4
elixir/hello-world/.formatter.exs
Normal file
4
elixir/hello-world/.formatter.exs
Normal file
@@ -0,0 +1,4 @@
|
||||
# Used by "mix format"
|
||||
[
|
||||
inputs: ["{mix,.formatter}.exs", "{config,lib,test}/**/*.{ex,exs}"]
|
||||
]
|
||||
24
elixir/hello-world/.gitignore
vendored
Normal file
24
elixir/hello-world/.gitignore
vendored
Normal file
@@ -0,0 +1,24 @@
|
||||
# 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").
|
||||
hello_world-*.tar
|
||||
|
||||
9
elixir/hello-world/lib/hello_world.ex
Normal file
9
elixir/hello-world/lib/hello_world.ex
Normal file
@@ -0,0 +1,9 @@
|
||||
defmodule HelloWorld do
|
||||
@doc """
|
||||
Simply returns "Hello, World!"
|
||||
"""
|
||||
@spec hello :: String.t()
|
||||
def hello do
|
||||
"Hello, World!"
|
||||
end
|
||||
end
|
||||
28
elixir/hello-world/mix.exs
Normal file
28
elixir/hello-world/mix.exs
Normal file
@@ -0,0 +1,28 @@
|
||||
defmodule HelloWorld.MixProject do
|
||||
use Mix.Project
|
||||
|
||||
def project do
|
||||
[
|
||||
app: :hello_world,
|
||||
version: "0.1.0",
|
||||
# elixir: "~> 1.8",
|
||||
start_permanent: Mix.env() == :prod,
|
||||
deps: deps()
|
||||
]
|
||||
end
|
||||
|
||||
# Run "mix help compile.app" to learn about applications.
|
||||
def application do
|
||||
[
|
||||
extra_applications: [:logger]
|
||||
]
|
||||
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
|
||||
7
elixir/hello-world/test/hello_world_test.exs
Normal file
7
elixir/hello-world/test/hello_world_test.exs
Normal file
@@ -0,0 +1,7 @@
|
||||
defmodule HelloWorldTest do
|
||||
use ExUnit.Case
|
||||
|
||||
test "says 'Hello, World!'" do
|
||||
assert HelloWorld.hello() == "Hello, World!"
|
||||
end
|
||||
end
|
||||
2
elixir/hello-world/test/test_helper.exs
Normal file
2
elixir/hello-world/test/test_helper.exs
Normal file
@@ -0,0 +1,2 @@
|
||||
ExUnit.start()
|
||||
ExUnit.configure(exclude: :pending, trace: true)
|
||||
Reference in New Issue
Block a user