-
Notifications
You must be signed in to change notification settings - Fork 9
/
noxfile.py
81 lines (75 loc) · 1.53 KB
/
noxfile.py
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
import nox
@nox.session
def build(session: nox.Session):
"""
Build the Ansible Collaborative website.
"""
session.install(
"-r", "requirements.in",
"-c", "requirements.txt",
)
session.run("nikola",
"build",
"--strict",
*session.posargs,
)
@nox.session
def clean(session: nox.Session):
"""
Clean the output directory and nikola cache.
"""
session.install(
"-r", "requirements.in",
"-c", "requirements.txt",
)
session.run("nikola",
"clean",
"--clean-dep",
*session.posargs,
)
@nox.session
def serve(session: nox.Session):
"""
Serve the website from a local browser.
"""
session.install(
"-r", "requirements.in",
"-c", "requirements.txt",
)
session.run("nikola",
"serve",
"-b",
*session.posargs,
)
@nox.session
def spelling(session: nox.Session):
"""
Spell check the website and blog
"""
session.install("codespell")
session.run("codespell",
*session.posargs,
"./",
)
@nox.session
def lint(session: nox.Session):
"""
Check the website templates for issues.
"""
session.install("djlint")
session.run("djlint",
"-",
"--lint",
*session.posargs,
)
@nox.session
def format(session: nox.Session):
"""
Format the website templates.
"""
session.install("djlint")
session.run("djlint",
"-",
"--reformat",
*session.posargs,
)