mix.exs (5782B)
1 defmodule Absinthe.Mixfile do 2 use Mix.Project 3 4 @source_url "https://github.com/absinthe-graphql/absinthe" 5 @version "1.7.0" 6 7 def project do 8 [ 9 app: :absinthe, 10 version: @version, 11 elixir: "~> 1.10", 12 elixirc_paths: elixirc_paths(Mix.env()), 13 build_embedded: Mix.env() == :prod, 14 start_permanent: Mix.env() == :prod, 15 package: package(), 16 source_url: @source_url, 17 preferred_cli_env: [ 18 dialyzer: :test 19 ], 20 docs: [ 21 source_ref: "v#{@version}", 22 main: "overview", 23 logo: "logo.png", 24 extra_section: "GUIDES", 25 assets: "guides/assets", 26 formatters: ["html", "epub"], 27 groups_for_modules: groups_for_modules(), 28 extras: extras(), 29 groups_for_extras: groups_for_extras() 30 ], 31 deps: deps(), 32 dialyzer: [ 33 plt_core_path: "priv/plts", 34 plt_add_apps: [:mix, :dataloader, :decimal, :ex_unit] 35 ] 36 ] 37 end 38 39 defp package do 40 [ 41 description: "GraphQL for Elixir", 42 files: [ 43 "lib", 44 "src/absinthe_parser.yrl", 45 "priv", 46 "mix.exs", 47 "README.md", 48 "CHANGELOG.md", 49 ".formatter.exs" 50 ], 51 maintainers: [ 52 "Bruce Williams", 53 "Ben Wilson", 54 "Vince Foley" 55 ], 56 licenses: ["MIT"], 57 links: %{ 58 Website: "https://absinthe-graphql.org", 59 Changelog: "#{@source_url}/blob/master/CHANGELOG.md", 60 GitHub: @source_url 61 } 62 ] 63 end 64 65 defp elixirc_paths(:test), do: ["lib", "test/support"] 66 defp elixirc_paths(_), do: ["lib"] 67 68 def application do 69 [extra_applications: [:crypto, :logger]] 70 end 71 72 defp deps do 73 [ 74 {:nimble_parsec, "~> 0.5 or ~> 1.0"}, 75 {:telemetry, "~> 1.0 or ~> 0.4"}, 76 {:dataloader, "~> 1.0.0", optional: true}, 77 {:decimal, "~> 1.0 or ~> 2.0", optional: true}, 78 {:ex_doc, "~> 0.22", only: :dev}, 79 {:benchee, ">= 1.0.0", only: :dev}, 80 {:dialyxir, "~> 1.1.0", only: [:dev, :test], runtime: false}, 81 {:mix_test_watch, "~> 1.0", only: :dev, runtime: false}, 82 {:makeup_graphql, "~> 0.1.0", only: :dev} 83 ] 84 end 85 86 # 87 # Documentation 88 # 89 90 defp extras do 91 [ 92 "guides/introduction/overview.md", 93 "guides/introduction/installation.md", 94 "guides/introduction/learning.md", 95 "guides/introduction/community.md", 96 "guides/tutorial/start.md", 97 "guides/tutorial/our-first-query.md", 98 "guides/tutorial/query-arguments.md", 99 "guides/tutorial/mutations.md", 100 "guides/tutorial/complex-arguments.md", 101 "guides/tutorial/conclusion.md", 102 "guides/schemas.md", 103 "guides/plug-phoenix.md", 104 "guides/middleware-and-plugins.md", 105 "guides/errors.md", 106 "guides/batching.md", 107 "guides/dataloader.md", 108 "guides/context-and-authentication.md", 109 "guides/subscriptions.md", 110 "guides/custom-scalars.md", 111 "guides/importing-types.md", 112 "guides/importing-fields.md", 113 "guides/variables.md", 114 "guides/introspection.md", 115 "guides/telemetry.md", 116 "guides/deprecation.md", 117 "guides/adapters.md", 118 "guides/complexity-analysis.md", 119 "guides/file-uploads.md", 120 "guides/testing.md", 121 "guides/client/javascript.md", 122 "guides/client/apollo.md", 123 "guides/client/relay.md", 124 "guides/upgrading/v1.4.md", 125 "guides/upgrading/v1.5.md", 126 "CHANGELOG.md" 127 ] 128 end 129 130 defp groups_for_extras do 131 [ 132 Introduction: ~r/guides\/introduction\/.*/, 133 Tutorial: ~r/guides\/tutorial\/.*/, 134 Topics: ~r/guides\/[^\/]+\.md/, 135 "Client Guides": ~r/guides\/client\/.*/, 136 "Upgrade Guides": ~r/guides\/upgrading\/.*/, 137 Changelog: "CHANGELOG.md" 138 ] 139 end 140 141 defp groups_for_modules do 142 # Ungrouped: 143 # - Absinthe 144 145 [ 146 "Schema Definition and Types": [ 147 Absinthe.Schema, 148 Absinthe.Schema.Hydrator, 149 Absinthe.Schema.Notation, 150 Absinthe.Schema.Prototype, 151 Absinthe.Resolution.Helpers, 152 Absinthe.Type, 153 Absinthe.Type.Custom, 154 Absinthe.Type.Argument, 155 Absinthe.Type.Custom, 156 Absinthe.Type.Directive, 157 Absinthe.Type.Enum, 158 Absinthe.Type.Enum.Value, 159 Absinthe.Type.Field, 160 Absinthe.Type.InputObject, 161 Absinthe.Type.Interface, 162 Absinthe.Type.List, 163 Absinthe.Type.NonNull, 164 Absinthe.Type.Object, 165 Absinthe.Type.Scalar, 166 Absinthe.Type.Union 167 ], 168 "Middleware and Plugins": [ 169 Absinthe.Middleware, 170 Absinthe.Plugin, 171 Absinthe.Middleware.Async, 172 Absinthe.Middleware.Batch, 173 Absinthe.Middleware.Dataloader, 174 Absinthe.Middleware.MapGet, 175 Absinthe.Middleware.PassParent, 176 Absinthe.Middleware.Telemetry 177 ], 178 Subscriptions: [ 179 Absinthe.Subscription, 180 Absinthe.Subscription.Pubsub, 181 Absinthe.Subscription.Local, 182 Absinthe.Subscription.PipelineSerializer 183 ], 184 Extensibility: [ 185 Absinthe.Pipeline, 186 Absinthe.Phase, 187 Absinthe.Phase.Document.Context, 188 Absinthe.Phase.Telemetry 189 ], 190 "Document Adapters": [ 191 Absinthe.Adapter, 192 Absinthe.Adapter.LanguageConventions, 193 Absinthe.Adapter.Passthrough, 194 Absinthe.Adapter.StrictLanguageConventions, 195 Absinthe.Adapter.Underscore 196 ], 197 Execution: [ 198 Absinthe.Blueprint, 199 Absinthe.Blueprint.Execution, 200 Absinthe.Resolution, 201 Absinthe.Complexity 202 ], 203 Introspection: [ 204 Absinthe.Introspection 205 ], 206 Testing: [ 207 Absinthe.Test 208 ], 209 Utilities: [ 210 Absinthe.Logger, 211 Absinthe.Utils, 212 Absinthe.Utils.Suggestion 213 ] 214 ] 215 end 216 end