Skip to content

Commit

Permalink
Set up project
Browse files Browse the repository at this point in the history
  • Loading branch information
paradox460 committed Nov 9, 2023
1 parent 8251bf3 commit 85348ad
Show file tree
Hide file tree
Showing 9 changed files with 110 additions and 0 deletions.
4 changes: 4 additions & 0 deletions .formatter.exs
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
# Used by "mix format"
[
inputs: ["{mix,.formatter}.exs", "{config,lib,test}/**/*.{ex,exs}"]
]
26 changes: 26 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -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").
djot-*.tar

# Temporary files, for example, from tests.
/tmp/
4 changes: 4 additions & 0 deletions .rtx.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
[tools]
elixir = "1.15.7-otp-26"
erlang = "26.1.2"
rust = "1.73.0"
3 changes: 3 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# Djot

A fast [Djot](https://djot.net) parser and formatter for Elixir.
18 changes: 18 additions & 0 deletions lib/djot.ex
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
defmodule Djot do
@moduledoc """
Documentation for `Djot`.
"""

@doc """
Hello world.
## Examples
iex> Djot.hello()
:world
"""
def hello do
:world
end
end
41 changes: 41 additions & 0 deletions mix.exs
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
defmodule Djot.MixProject do
use Mix.Project

@source_url "https://github.com/paradox460/djot"

def project do
[
app: :djot,
version: "2023.11.0",
elixir: "~> 1.15",
start_permanent: Mix.env() == :prod,
source_url: @source_url,
homepage_url: @source_url,
name: "Djot",
description: "A Djot parser and formatter",
deps: deps()
]
end

def package do
[
maintainers: ["Jeff Sandberg"],
licenses: ["MIT"],
links: %{
GitHub: @source_url
}
]
end

def application do
[
extra_applications: [:logger]
]
end

defp deps do
[
{:rustler, "~> 0.30.0"}
]
end
end
5 changes: 5 additions & 0 deletions mix.lock
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
%{
"jason": {:hex, :jason, "1.4.1", "af1504e35f629ddcdd6addb3513c3853991f694921b1b9368b0bd32beb9f1b63", [:mix], [{:decimal, "~> 1.0 or ~> 2.0", [hex: :decimal, repo: "hexpm", optional: true]}], "hexpm", "fbb01ecdfd565b56261302f7e1fcc27c4fb8f32d56eab74db621fc154604a7a1"},
"rustler": {:hex, :rustler, "0.30.0", "cefc49922132b072853fa9b0ca4dc2ffcb452f68fb73b779042b02d545e097fb", [:mix], [{:jason, "~> 1.0", [hex: :jason, repo: "hexpm", optional: false]}, {:toml, "~> 0.6", [hex: :toml, repo: "hexpm", optional: false]}], "hexpm", "9ef1abb6a7dda35c47cfc649e6a5a61663af6cf842a55814a554a84607dee389"},
"toml": {:hex, :toml, "0.7.0", "fbcd773caa937d0c7a02c301a1feea25612720ac3fa1ccb8bfd9d30d822911de", [:mix], [], "hexpm", "0690246a2478c1defd100b0c9b89b4ea280a22be9a7b313a8a058a2408a2fa70"},
}
8 changes: 8 additions & 0 deletions test/djot_test.exs
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
defmodule DjotTest do
use ExUnit.Case
doctest Djot

test "greets the world" do
assert Djot.hello() == :world
end
end
1 change: 1 addition & 0 deletions test/test_helper.exs
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
ExUnit.start()

0 comments on commit 85348ad

Please sign in to comment.