forked from elixir-crawly/crawly
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmix.exs
114 lines (107 loc) · 3.06 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
113
114
defmodule Crawly.Mixfile do
use Mix.Project
@source_url "https://github.com/oltarasenko/crawly"
@version "0.17.2"
def project do
[
app: :crawly,
version: @version,
name: "Crawly",
elixir: "~> 1.14",
package: package(),
start_permanent: Mix.env() == :prod,
elixirc_paths: elixirc_paths(Mix.env()),
docs: docs(),
deps: deps(),
elixirc_options: [warnings_as_errors: true]
]
end
defp elixirc_paths(:test), do: ["lib", "test"]
defp elixirc_paths(_), do: ["lib"]
# Run "mix help compile.app" to learn about applications.
def application do
[
extra_applications: [:logger, :sasl, :httpoison],
mod: {Crawly.Application, []}
]
end
defp package() do
[
# This option is only needed when you don't want to use the OTP
# application name
name: "crawly",
description: "High-level web crawling & scraping framework for Elixir.",
licenses: ["Apache-2.0"],
links: %{
"GitHub" => @source_url
}
]
end
# Run "mix help deps" to learn about dependencies.
defp deps do
[
{:httpoison, "~> 2.2"},
{:elixir_uuid, "~> 1.2"},
{:poison, "~> 3.1"},
{:gollum, "~> 0.5.0", hex: :new_gollum},
{:plug_cowboy, "~> 2.0"},
{:credo, "~> 1.7", only: [:dev, :test], runtime: false},
{:ex_doc, ">= 0.0.0", only: :dev, runtime: false},
{:earmark, "~> 1.2", only: :dev},
{:meck, "~> 0.9", only: :test},
{:excoveralls, "~> 0.14.6", only: :test},
{:yaml_elixir, "~> 2.9"},
{:ex_json_schema, "~> 0.9.2"},
# Add floki only for crawly standalone release
{:floki, "~> 0.33.0", only: [:dev, :test, :standalone_crawly]},
{:logger_file_backend, "~> 0.0.11",
only: [:test, :dev, :standalone_crawly]}
]
end
defp docs do
[
assets: %{"documentation/assets" => "assets"},
logo: "documentation/assets/logo.png",
extras: extras(),
main: "readme",
source_url: @source_url,
source_ref: "v#{@version}",
formatters: ["html"],
groups_for_modules: [
"Building Spiders": [
Crawly.Response,
Crawly.Request,
Crawly.Spider,
Crawly.ParsedItem
],
"Middlewares and Pipelines": ~r"Crawly\.(Pipeline|Middlewares)(.*)",
"Under the Hood": [
Crawly.Engine,
Crawly.Manager,
Crawly.Worker,
Crawly.DataStorage,
Crawly.DataStorage.Worker,
Crawly.RequestsStorage,
Crawly.RequestsStorage.Worker
]
],
nest_modules_by_prefix: [
Crawly.Middlewares,
Crawly.Pipelines
]
]
end
defp extras do
[
"documentation/basic_concepts.md",
"documentation/configuration.md",
"documentation/http_api.md",
"documentation/ethical_aspects.md",
"documentation/experimental_ui.md",
"documentation/standalone_crawly.md",
"documentation/spiders_in_yml.md",
LICENSE: [title: "License"],
"README.md": [title: "Introduction", file: "readme"]
]
end
end