Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
42 changes: 28 additions & 14 deletions lib/docset.ex
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,8 @@ defmodule ExDash.Docset do
defp build_sqlite_db(project_nodes, config, database_path) do
SQLite.create_index(database_path)

Autolink.all(project_nodes, ".html", config.deps)
compiled = Autolink.compile(project_nodes, ".html", config)
Autolink.all(project_nodes, compiled)
|> Enum.map(&index_node(&1, database_path))
end

Expand Down Expand Up @@ -114,19 +115,32 @@ defmodule ExDash.Docset do
end

@info_plist_template """
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>CFBundleIdentifier</key> <string>{{CONFIG_PROJECT}}-{{CONFIG_VERSION}}</string>
<key>CFBundleName</key> <string>{{CONFIG_PROJECT}} {{CONFIG_VERSION}}</string>
<key>DocSetPlatformFamily</key> <string>{{CONFIG_PROJECT_ABBREV}}</string>
<key>isDashDocset</key> <true/>
<key>isJavaScriptEnabled</key> <true/>
<key>dashIndexFilePath</key> <string>index.html</string>
<key>DashDocSetFamily</key> <string>dashtoc</string>
</dict>
</plist>
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>CFBundleIdentifier</key>
<string>{{CONFIG_PROJECT}}-{{CONFIG_VERSION}}</string>

<key>CFBundleName</key>
<string>{{CONFIG_PROJECT}} {{CONFIG_VERSION}}</string>

<key>DocSetPlatformFamily</key>
<string>{{CONFIG_PROJECT_ABBREV}}</string>

<key>isDashDocset</key>
<true/>

<key>isJavaScriptEnabled</key>
<true/>

<key>dashIndexFilePath</key>
<string>index.html</string>

<key>DashDocSetFamily</key>
<string>dashtoc</string>
</dict>
</plist>
"""

defp info_plist_content(%{project: name, version: version}) do
Expand Down
1 change: 0 additions & 1 deletion lib/mix/tasks/dash.ex
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
defmodule Mix.Tasks.Docs.Dash do
@moduledoc """
Run ExDoc with a Dash Docs compatible formatter and output.

"""

use Mix.Task
Expand Down
10 changes: 5 additions & 5 deletions mix.exs
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@ defmodule ExDash.Mixfile do

def project do
[app: :ex_dash,
version: "0.1.6",
elixir: "~> 1.4",
version: "0.2.0",
elixir: "~> 1.7",
build_embedded: Mix.env == :prod,
start_permanent: Mix.env == :prod,
source_url: "https://github.com/urbint/ex_dash",
Expand Down Expand Up @@ -33,9 +33,9 @@ defmodule ExDash.Mixfile do
# Type "mix help deps" for more examples and options
defp deps do
[
{:ex_doc, "~> 0.16"},
{:floki, "~> 0.14.0"},
{:cortex, "~> 0.1"}
{:ex_doc, "~> 0.21.2"},
{:floki, "~> 0.23.0"},
{:cortex, "~> 0.5.0"}
]
end

Expand Down
18 changes: 13 additions & 5 deletions mix.lock
Original file line number Diff line number Diff line change
@@ -1,6 +1,14 @@
%{"earmark": {:hex, :earmark, "1.2.2", "f718159d6b65068e8daeef709ccddae5f7fdc770707d82e7d126f584cd925b74", [:mix], []},
"ex_doc": {:hex, :ex_doc, "0.16.0", "d598d2c654786a3de231202fcd1565a3df6c068c295cebc6d3d57589e8a97ea1", [:mix], [{:earmark, "~> 1.1", [hex: :earmark, optional: false]}]},
"floki": {:hex, :floki, "0.14.0", "91a6be57349e10a63cf52d7890479a19012cef9185fa93c305d4fe42e6a50dee", [:mix], [{:mochiweb, "~> 2.15", [hex: :mochiweb, optional: false]}]},
%{
"cortex": {:hex, :cortex, "0.5.0", "7b12ddcfa9fd61521dd3b841ef8a4758ccab895d6a5d4ed181a5a8ad4b4592a4", [:mix], [{:file_system, "~> 0.2", [hex: :file_system, repo: "hexpm", optional: false]}], "hexpm"},
"earmark": {:hex, :earmark, "1.4.1", "07bb382826ee8d08d575a1981f971ed41bd5d7e86b917fd012a93c51b5d28727", [:mix], [], "hexpm"},
"ex_doc": {:hex, :ex_doc, "0.21.2", "caca5bc28ed7b3bdc0b662f8afe2bee1eedb5c3cf7b322feeeb7c6ebbde089d6", [:mix], [{:earmark, "~> 1.3.3 or ~> 1.4", [hex: :earmark, repo: "hexpm", optional: false]}, {:makeup_elixir, "~> 0.14", [hex: :makeup_elixir, repo: "hexpm", optional: false]}], "hexpm"},
"file_system": {:hex, :file_system, "0.2.7", "e6f7f155970975789f26e77b8b8d8ab084c59844d8ecfaf58cbda31c494d14aa", [:mix], [], "hexpm"},
"floki": {:hex, :floki, "0.23.0", "956ab6dba828c96e732454809fb0bd8d43ce0979b75f34de6322e73d4c917829", [:mix], [{:html_entities, "~> 0.4.0", [hex: :html_entities, repo: "hexpm", optional: false]}], "hexpm"},
"html_entities": {:hex, :html_entities, "0.4.0", "f2fee876858cf6aaa9db608820a3209e45a087c5177332799592142b50e89a6b", [:mix], [], "hexpm"},
"inch_ex": {:hex, :inch_ex, "0.5.6", "418357418a553baa6d04eccd1b44171936817db61f4c0840112b420b8e378e67", [:mix], [{:poison, "~> 1.5 or ~> 2.0 or ~> 3.0", [hex: :poison, optional: false]}]},
"mochiweb": {:hex, :mochiweb, "2.15.0", "e1daac474df07651e5d17cc1e642c4069c7850dc4508d3db7263a0651330aacc", [:rebar3], []},
"poison": {:hex, :poison, "3.1.0", "d9eb636610e096f86f25d9a46f35a9facac35609a7591b3be3326e99a0484665", [:mix], []}}
"makeup": {:hex, :makeup, "1.0.0", "671df94cf5a594b739ce03b0d0316aa64312cee2574b6a44becb83cd90fb05dc", [:mix], [{:nimble_parsec, "~> 0.5.0", [hex: :nimble_parsec, repo: "hexpm", optional: false]}], "hexpm"},
"makeup_elixir": {:hex, :makeup_elixir, "0.14.0", "cf8b7c66ad1cff4c14679698d532f0b5d45a3968ffbcbfd590339cb57742f1ae", [:mix], [{:makeup, "~> 1.0", [hex: :makeup, repo: "hexpm", optional: false]}], "hexpm"},
"mochiweb": {:hex, :mochiweb, "2.18.0", "eb55f1db3e6e960fac4e6db4e2db9ec3602cc9f30b86cd1481d56545c3145d2e", [:rebar3], [], "hexpm"},
"nimble_parsec": {:hex, :nimble_parsec, "0.5.1", "c90796ecee0289dbb5ad16d3ad06f957b0cd1199769641c961cfe0b97db190e0", [:mix], [], "hexpm"},
"poison": {:hex, :poison, "3.1.0", "d9eb636610e096f86f25d9a46f35a9facac35609a7591b3be3326e99a0484665", [:mix], []},
}