forked from livebook-dev/kino
-
Notifications
You must be signed in to change notification settings - Fork 0
/
mix.exs
112 lines (103 loc) · 2.29 KB
/
mix.exs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
defmodule Kino.MixProject do
use Mix.Project
@version "0.12.3"
@description "Interactive widgets for Livebook"
def project do
[
app: :kino,
version: @version,
description: @description,
name: "Kino",
elixir: "~> 1.14",
elixirc_paths: elixirc_paths(Mix.env()),
start_permanent: Mix.env() == :prod,
deps: deps(),
aliases: aliases(),
docs: docs(),
package: package()
]
end
def application do
[
mod: {Kino.Application, []},
extra_applications: [:logger, :crypto]
]
end
defp elixirc_paths(:test), do: ["lib", "test/support"]
defp elixirc_paths(_), do: ["lib"]
defp deps do
[
{:table, "~> 0.1.2"},
{:fss, "~> 0.1.0"},
{:nx, "~> 0.1", optional: true},
{:plug, "~> 1.0", optional: true},
{:ex_doc, "~> 0.28", only: :dev, runtime: false}
]
end
defp aliases do
[
"assets.setup": assets_cmd("npm install"),
"assets.build": assets_cmd("npm run build")
]
end
defp assets_cmd(command) do
fn _args ->
for dir <- File.ls!("assets") do
Mix.shell().cmd(command, cd: Path.join("assets", dir))
end
end
end
defp docs do
[
main: "Kino",
source_url: "https://github.com/livebook-dev/kino",
source_ref: "v#{@version}",
logo: "images/kino_without_text.png",
groups_for_modules: [
# Kino
# Kino.Hub
# Kino.Control
# Kino.Frame
# Kino.Input
# Kino.Process
# Kino.Shorts
"Built-in Kinos": [
Kino.Audio,
Kino.DataTable,
Kino.Download,
Kino.ETS,
Kino.HTML,
Kino.Image,
Kino.Layout,
Kino.Markdown,
Kino.Mermaid,
Kino.Text,
Kino.Tree,
Kino.Video
],
"Custom Kinos": [
Kino.JS,
Kino.JS.Live,
Kino.JS.Live.Context,
Kino.SmartCell
],
"Protocols and Behaviours": [
Kino.Render,
Kino.Inspect,
Kino.Table
],
Testing: [
Kino.Test
]
]
]
end
def package do
[
licenses: ["Apache-2.0"],
links: %{
"GitHub" => "https://github.com/livebook-dev/kino"
}
]
end
end