Skip to content

Commit 37cc1e0

Browse files
committed
init
0 parents  commit 37cc1e0

12 files changed

+207
-0
lines changed

.formatter.exs

+4
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
# Used by "mix format"
2+
[
3+
inputs: ["mix.exs", "{config,lib,test}/**/*.{ex,exs}"]
4+
]

.gitignore

+30
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
# The directory Mix will write compiled artifacts to.
2+
/_build/
3+
4+
# If you run "mix test --cover", coverage assets end up here.
5+
/cover/
6+
7+
# The directory Mix downloads your dependencies sources to.
8+
/deps/
9+
10+
# Where 3rd-party dependencies like ExDoc output generated docs.
11+
/doc/
12+
13+
# Ignore .fetch files in case you like to edit your project deps locally.
14+
/.fetch
15+
16+
# If the VM crashes, it generates a dump, let's ignore it too.
17+
erl_crash.dump
18+
19+
# Also ignore archive artifacts (built via "mix archive.build").
20+
*.ez
21+
22+
# Ignore package tarball (built via "mix hex.build").
23+
elchemy_example-*.tar
24+
25+
26+
elm-deps
27+
elm-stuff
28+
node_modules/
29+
.elchemy/
30+
.elchemy.exs

README.md

+21
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
# ElchemyExample
2+
3+
**TODO: Add description**
4+
5+
## Installation
6+
7+
If [available in Hex](https://hex.pm/docs/publish), the package can be installed
8+
by adding `elchemy_example` to your list of dependencies in `mix.exs`:
9+
10+
```elixir
11+
def deps do
12+
[
13+
{:elchemy_example, "~> 0.1.0"}
14+
]
15+
end
16+
```
17+
18+
Documentation can be generated with [ExDoc](https://github.com/elixir-lang/ex_doc)
19+
and published on [HexDocs](https://hexdocs.pm). Once published, the docs can
20+
be found at [https://hexdocs.pm/elchemy_example](https://hexdocs.pm/elchemy_example).
21+

config/config.exs

+30
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
# This file is responsible for configuring your application
2+
# and its dependencies with the aid of the Mix.Config module.
3+
use Mix.Config
4+
5+
# This configuration is loaded before any dependency and is restricted
6+
# to this project. If another project depends on this project, this
7+
# file won't be loaded nor affect the parent project. For this reason,
8+
# if you want to provide default values for your application for
9+
# 3rd-party users, it should be done in your "mix.exs" file.
10+
11+
# You can configure your application as:
12+
#
13+
# config :elchemy_example, key: :value
14+
#
15+
# and access this configuration in your application as:
16+
#
17+
# Application.get_env(:elchemy_example, :key)
18+
#
19+
# You can also configure a 3rd-party app:
20+
#
21+
# config :logger, level: :info
22+
#
23+
24+
# It is also possible to import configuration files, relative to this
25+
# directory. For example, you can emulate configuration per environment
26+
# by uncommenting the line below and defining dev.exs, test.exs and such.
27+
# Configuration from the imported file will override the ones defined
28+
# here (which is why it is important to import them last).
29+
#
30+
# import_config "#{Mix.env}.exs"

elm-package.json

+15
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
{
2+
"version": "1.0.0",
3+
"summary": "helpful summary of your project, less than 80 characters",
4+
"repository": "https://github.com/user/project.git",
5+
"license": "BSD3",
6+
"source-directories": [
7+
"./elm"
8+
],
9+
"exposed-modules": [],
10+
"dependencies": {
11+
"elm-lang/core": "5.1.1 <= v < 6.0.0",
12+
"wende/elchemy-core": "0.0.0 <= v < 0.7.0"
13+
},
14+
"elm-version": "0.18.0 <= v < 0.19.0"
15+
}

elm/Hello.elm

+14
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
module Hello exposing (..)
2+
3+
{-| Example module, It says hello if you ask it nicely
4+
-}
5+
6+
7+
{-| Prints "world!"
8+
9+
hello == "world!"
10+
11+
-}
12+
hello : String
13+
hello =
14+
"world!"

lib/Hello.elchemy.ex

+28
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
2+
# Compiled using Elchemy v0.7.4
3+
defmodule Hello do
4+
use Elchemy
5+
6+
7+
@moduledoc """
8+
Example module, It says hello if you ask it nicely
9+
10+
"""
11+
@doc """
12+
Prints "world!"
13+
14+
iex> import Hello
15+
iex> hello()
16+
"world!"
17+
18+
19+
"""
20+
@spec hello() :: String.t
21+
def hello() do
22+
"world!"
23+
end
24+
25+
end
26+
27+
28+

lib/elchemy_example.ex

+18
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
defmodule ElchemyExample do
2+
@moduledoc """
3+
Documentation for ElchemyExample.
4+
"""
5+
6+
@doc """
7+
Hello world.
8+
9+
## Examples
10+
11+
iex> ElchemyExample.hello
12+
:world
13+
14+
"""
15+
def hello do
16+
:world
17+
end
18+
end

mix.exs

+28
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
defmodule ElchemyExample.MixProject do
2+
use Mix.Project
3+
4+
def project do
5+
[
6+
app: :elchemy_example,
7+
version: "0.1.0",
8+
elixir: "~> 1.6",
9+
start_permanent: Mix.env() == :prod,
10+
deps: deps()
11+
] |> elem(Code.eval_file(".elchemy.exs"), 0).init
12+
end
13+
14+
# Run "mix help compile.app" to learn about applications.
15+
def application do
16+
[
17+
extra_applications: [:logger]
18+
]
19+
end
20+
21+
# Run "mix help deps" to learn about dependencies.
22+
defp deps do
23+
[
24+
# {:dep_from_hexpm, "~> 0.3.0"},
25+
# {:dep_from_git, git: "https://github.com/elixir-lang/my_dep.git", tag: "0.1.0"},
26+
]
27+
end
28+
end

test/elchemy_example_test.exs

+8
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
defmodule ElchemyExampleTest do
2+
use ExUnit.Case
3+
doctest ElchemyExample
4+
5+
test "greets the world" do
6+
assert ElchemyExample.hello() == :world
7+
end
8+
end

test/elchemy_test.exs

+10
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
defmodule ElchemyTest do
2+
use ExUnit.Case
3+
use Elchemy
4+
doctest Hello
5+
6+
test "Hello" do
7+
assert Hello.hello() == "world!"
8+
end
9+
10+
end

test/test_helper.exs

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
ExUnit.start()

0 commit comments

Comments
 (0)