Repository navigation
Expand file tree
/
Copy pathmix.exs
More file actions
125 lines (118 loc) · 3.52 KB
/
Copy pathmix.exs
File metadata and controls
125 lines (118 loc) · 3.52 KB
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
115
116
117
118
119
120
121
122
123
124
125
defmodule NPM.MixProject do
use Mix.Project
@version "0.7.6"
@source_url "https://github.com/elixir-volt/npm_ex"
def project do
[
app: :npm,
version: @version,
elixir: "~> 1.19",
start_permanent: Mix.env() == :prod,
deps: deps(),
aliases: aliases(),
dialyzer: [plt_add_apps: [:mix], flags: [:no_opaque]],
name: "NPM",
description:
"npm package manager for Elixir — resolve, fetch, and manage npm dependencies with Mix tasks.",
source_url: @source_url,
homepage_url: @source_url,
package: package(),
docs: docs()
]
end
def application do
[extra_applications: [:crypto]]
end
defp aliases do
[
lint: [
"format --check-formatted",
"credo --strict",
"ex_dna",
"dialyzer"
],
ci: ["lint", "cmd env MIX_ENV=test mix test"]
]
end
defp deps do
[
{:npm_semver, "~> 0.1.0"},
{:hex_solver, "~> 0.2"},
{:jason, "~> 1.4"},
{:req, "~> 0.5"},
{:dialyxir, "~> 1.4", only: [:dev, :test], runtime: false},
{:credo, "~> 1.7", only: [:dev, :test], runtime: false},
{:ex_slop, "~> 0.4", only: [:dev, :test], runtime: false},
{:ex_dna, "~> 1.5", only: [:dev, :test], runtime: false},
{:ex_doc, "~> 0.35", only: :dev, runtime: false}
]
end
defp package do
[
licenses: ["MIT"],
links: %{"GitHub" => @source_url},
files: ~w[lib priv guides mix.exs README.md LICENSE CHANGELOG.md]
]
end
defp docs do
[
main: "readme",
extras: [
"README.md",
"CHANGELOG.md",
"guides/introduction/getting-started.md",
"guides/introduction/why-npm-ex.md",
"guides/workflows/dependencies.md",
"guides/workflows/ci.md",
"guides/workflows/runtime-install.md",
"guides/security/supply-chain-safety.md",
"guides/security/malicious-package-audits.md",
"guides/reference/configuration.md",
"guides/reference/mix-tasks.md",
"guides/cheatsheets/cli.cheatmd",
"guides/cheatsheets/configuration.cheatmd"
],
groups_for_extras: [
Introduction: ~r/guides\/introduction\//,
Workflows: ~r/guides\/workflows\//,
Security: ~r/guides\/security\//,
Reference: ~r/guides\/reference\//,
Cheatsheets: ~r/guides\/cheatsheets\//
],
groups_for_modules: [
Core: [NPM, NPM.Config, NPM.Cache, NPM.Lockfile],
"Package Metadata": [NPM.Package.JSON, NPM.Package.Manifest, NPM.Package.Spec],
Dependencies: [
NPM.Dependency.Graph,
NPM.Dependency.Dedupe,
NPM.Dependency.Outdated,
NPM.Dependency.Peer
],
Install: [NPM.Install.Linker, NPM.Install.Lifecycle, NPM.Install.ScriptInstall],
Security: [
NPM.Security.Audit,
NPM.Security.Compromised,
NPM.Security.ExoticDeps,
NPM.Security.RegistryPolicy
],
Registry: [
NPM.Registry,
NPM.Registry.URL,
NPM.Registry.Mirror,
NPM.Registry.Scope,
NPM.Registry.Token
],
Node: [NPM.Node.Exec, NPM.Node.Runner, NPM.Node.Bin, NPM.Node.BinResolver],
Diagnostics: [NPM.Diagnostics, NPM.Diagnostics.Doctor, NPM.Diagnostics.Health],
"Mix Tasks": [
Mix.Tasks.Npm.Install,
Mix.Tasks.Npm.Ci,
Mix.Tasks.Npm.Audit,
Mix.Tasks.Npm.Verify,
Mix.Tasks.Npm.Exec
]
],
source_ref: "v#{@version}"
]
end
end