summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDong Ma <winterma.dong@gmail.com>2016-10-12 22:05:27 -0700
committerDong Ma <winterma.dong@gmail.com>2016-10-21 17:22:30 +0000
commitade27364a53084ac7ad6fbd9e6bd5daddcdd7523 (patch)
tree7497f9ee2b19c3365835e29c981bfdf21d6ebd38
parentc457a0e9d84c6c7265cf033290eebb260a6c9e02 (diff)
Fix the gate npm docs failure
This commit try to fix the gate nodejs4 npm docs failure by adding docs script. Change-Id: I186d3ec7fc826ea767c57bad5cf3e2f5676c19bb
Notes
Notes (review): Code-Review+1: Vitaly Kramskikh <vkramskikh@mirantis.com> Code-Review+1: Mitchell Smolash <mitch@smolash.com> Code-Review+1: Corentin Ardeois <corentin.ardeois@gmail.com> Code-Review+1: Yujun Zhang <zhang.yujunz@zte.com.cn> Code-Review+2: Michael Krotscheck <krotscheck@gmail.com> Code-Review+2: Matthew Treinish <mtreinish@kortar.org> Workflow+1: Matthew Treinish <mtreinish@kortar.org> Verified+2: Jenkins Submitted-by: Jenkins Submitted-at: Thu, 27 Oct 2016 13:39:11 +0000 Reviewed-on: https://review.openstack.org/385777 Project: openstack/eslint-config-openstack Branch: refs/heads/master
-rw-r--r--bindep.txt5
-rw-r--r--doc/Makefile227
-rw-r--r--package.json3
3 files changed, 234 insertions, 1 deletions
diff --git a/bindep.txt b/bindep.txt
new file mode 100644
index 0000000..413ec90
--- /dev/null
+++ b/bindep.txt
@@ -0,0 +1,5 @@
1# This is a cross-platform list tracking distribution packages needed by tests;
2# see http://docs.openstack.org/infra/bindep/ for additional information.
3
4python-sphinx [platform:dpkg]
5python-oslosphinx [platform:dpkg]
diff --git a/doc/Makefile b/doc/Makefile
new file mode 100644
index 0000000..d370944
--- /dev/null
+++ b/doc/Makefile
@@ -0,0 +1,227 @@
1# Makefile for Sphinx documentation
2#
3
4# You can set these variables from the command line.
5SPHINXOPTS =
6SPHINXBUILD = sphinx-build
7PAPER =
8BUILDDIR = build
9VENVDIR = .venv
10
11# Internal variables.
12PAPEROPT_a4 = -D latex_paper_size=a4
13PAPEROPT_letter = -D latex_paper_size=letter
14ALLSPHINXOPTS = -d $(BUILDDIR)/doctrees $(PAPEROPT_$(PAPER)) $(SPHINXOPTS) source
15# the i18n builder cannot share the environment and doctrees with the others
16I18NSPHINXOPTS = $(PAPEROPT_$(PAPER)) $(SPHINXOPTS) source
17
18
19.PHONY: help
20help:
21 @echo "Please use \`make <target>' where <target> is one of"
22 @echo " html to make standalone HTML files"
23 @echo " dirhtml to make HTML files named index.html in directories"
24 @echo " singlehtml to make a single large HTML file"
25 @echo " pickle to make pickle files"
26 @echo " json to make JSON files"
27 @echo " htmlhelp to make HTML files and a HTML help project"
28 @echo " qthelp to make HTML files and a qthelp project"
29 @echo " applehelp to make an Apple Help Book"
30 @echo " devhelp to make HTML files and a Devhelp project"
31 @echo " epub to make an epub"
32 @echo " epub3 to make an epub3"
33 @echo " latex to make LaTeX files, you can set PAPER=a4 or PAPER=letter"
34 @echo " latexpdf to make LaTeX files and run them through pdflatex"
35 @echo " latexpdfja to make LaTeX files and run them through platex/dvipdfmx"
36 @echo " text to make text files"
37 @echo " man to make manual pages"
38 @echo " texinfo to make Texinfo files"
39 @echo " info to make Texinfo files and run them through makeinfo"
40 @echo " gettext to make PO message catalogs"
41 @echo " changes to make an overview of all changed/added/deprecated items"
42 @echo " xml to make Docutils-native XML files"
43 @echo " pseudoxml to make pseudoxml-XML files for display purposes"
44 @echo " linkcheck to check all external links for integrity"
45 @echo " doctest to run all doctests embedded in the documentation (if enabled)"
46 @echo " coverage to run coverage check of the documentation (if enabled)"
47 @echo " dummy to check syntax errors of document sources"
48
49.PHONY: clean
50clean:
51 rm -rf $(BUILDDIR)/*
52
53.PHONY: html
54html:
55 $(SPHINXBUILD) -b html $(ALLSPHINXOPTS) $(BUILDDIR)/html
56 @echo
57 @echo "Build finished. The HTML pages are in $(BUILDDIR)/html."
58
59.PHONY: dirhtml
60dirhtml:
61 $(SPHINXBUILD) -b dirhtml $(ALLSPHINXOPTS) $(BUILDDIR)/dirhtml
62 @echo
63 @echo "Build finished. The HTML pages are in $(BUILDDIR)/dirhtml."
64
65.PHONY: singlehtml
66singlehtml:
67 $(SPHINXBUILD) -b singlehtml $(ALLSPHINXOPTS) $(BUILDDIR)/singlehtml
68 @echo
69 @echo "Build finished. The HTML page is in $(BUILDDIR)/singlehtml."
70
71.PHONY: pickle
72pickle:
73 $(SPHINXBUILD) -b pickle $(ALLSPHINXOPTS) $(BUILDDIR)/pickle
74 @echo
75 @echo "Build finished; now you can process the pickle files."
76
77.PHONY: json
78json:
79 $(SPHINXBUILD) -b json $(ALLSPHINXOPTS) $(BUILDDIR)/json
80 @echo
81 @echo "Build finished; now you can process the JSON files."
82
83.PHONY: htmlhelp
84htmlhelp:
85 $(SPHINXBUILD) -b htmlhelp $(ALLSPHINXOPTS) $(BUILDDIR)/htmlhelp
86 @echo
87 @echo "Build finished; now you can run HTML Help Workshop with the" \
88 ".hhp project file in $(BUILDDIR)/htmlhelp."
89
90.PHONY: qthelp
91qthelp:
92 $(SPHINXBUILD) -b qthelp $(ALLSPHINXOPTS) $(BUILDDIR)/qthelp
93 @echo
94 @echo "Build finished; now you can run "qcollectiongenerator" with the" \
95 ".qhcp project file in $(BUILDDIR)/qthelp, like this:"
96 @echo "# qcollectiongenerator $(BUILDDIR)/qthelp/openstack-lib.qhcp"
97 @echo "To view the help file:"
98 @echo "# assistant -collectionFile $(BUILDDIR)/qthelp/openstack-lib.qhc"
99
100.PHONY: applehelp
101applehelp:
102 $(SPHINXBUILD) -b applehelp $(ALLSPHINXOPTS) $(BUILDDIR)/applehelp
103 @echo
104 @echo "Build finished. The help book is in $(BUILDDIR)/applehelp."
105 @echo "N.B. You won't be able to view it unless you put it in" \
106 "~/Library/Documentation/Help or install it in your application" \
107 "bundle."
108
109.PHONY: devhelp
110devhelp:
111 $(SPHINXBUILD) -b devhelp $(ALLSPHINXOPTS) $(BUILDDIR)/devhelp
112 @echo
113 @echo "Build finished."
114 @echo "To view the help file:"
115 @echo "# mkdir -p $$HOME/.local/share/devhelp/openstack-lib"
116 @echo "# ln -s $(BUILDDIR)/devhelp $$HOME/.local/share/devhelp/openstack-lib"
117 @echo "# devhelp"
118
119.PHONY: epub
120epub:
121 $(SPHINXBUILD) -b epub $(ALLSPHINXOPTS) $(BUILDDIR)/epub
122 @echo
123 @echo "Build finished. The epub file is in $(BUILDDIR)/epub."
124
125.PHONY: epub3
126epub3:
127 $(SPHINXBUILD) -b epub3 $(ALLSPHINXOPTS) $(BUILDDIR)/epub3
128 @echo
129 @echo "Build finished. The epub3 file is in $(BUILDDIR)/epub3."
130
131.PHONY: latex
132latex:
133 $(SPHINXBUILD) -b latex $(ALLSPHINXOPTS) $(BUILDDIR)/latex
134 @echo
135 @echo "Build finished; the LaTeX files are in $(BUILDDIR)/latex."
136 @echo "Run \`make' in that directory to run these through (pdf)latex" \
137 "(use \`make latexpdf' here to do that automatically)."
138
139.PHONY: latexpdf
140latexpdf:
141 $(SPHINXBUILD) -b latex $(ALLSPHINXOPTS) $(BUILDDIR)/latex
142 @echo "Running LaTeX files through pdflatex..."
143 $(MAKE) -C $(BUILDDIR)/latex all-pdf
144 @echo "pdflatex finished; the PDF files are in $(BUILDDIR)/latex."
145
146.PHONY: latexpdfja
147latexpdfja:
148 $(SPHINXBUILD) -b latex $(ALLSPHINXOPTS) $(BUILDDIR)/latex
149 @echo "Running LaTeX files through platex and dvipdfmx..."
150 $(MAKE) -C $(BUILDDIR)/latex all-pdf-ja
151 @echo "pdflatex finished; the PDF files are in $(BUILDDIR)/latex."
152
153.PHONY: text
154text:
155 $(SPHINXBUILD) -b text $(ALLSPHINXOPTS) $(BUILDDIR)/text
156 @echo
157 @echo "Build finished. The text files are in $(BUILDDIR)/text."
158
159.PHONY: man
160man:
161 $(SPHINXBUILD) -b man $(ALLSPHINXOPTS) $(BUILDDIR)/man
162 @echo
163 @echo "Build finished. The manual pages are in $(BUILDDIR)/man."
164
165.PHONY: texinfo
166texinfo:
167 $(SPHINXBUILD) -b texinfo $(ALLSPHINXOPTS) $(BUILDDIR)/texinfo
168 @echo
169 @echo "Build finished. The Texinfo files are in $(BUILDDIR)/texinfo."
170 @echo "Run \`make' in that directory to run these through makeinfo" \
171 "(use \`make info' here to do that automatically)."
172
173.PHONY: info
174info:
175 $(SPHINXBUILD) -b texinfo $(ALLSPHINXOPTS) $(BUILDDIR)/texinfo
176 @echo "Running Texinfo files through makeinfo..."
177 make -C $(BUILDDIR)/texinfo info
178 @echo "makeinfo finished; the Info files are in $(BUILDDIR)/texinfo."
179
180.PHONY: gettext
181gettext:
182 $(SPHINXBUILD) -b gettext $(I18NSPHINXOPTS) $(BUILDDIR)/locale
183 @echo
184 @echo "Build finished. The message catalogs are in $(BUILDDIR)/locale."
185
186.PHONY: changes
187changes:
188 $(SPHINXBUILD) -b changes $(ALLSPHINXOPTS) $(BUILDDIR)/changes
189 @echo
190 @echo "The overview file is in $(BUILDDIR)/changes."
191
192.PHONY: linkcheck
193linkcheck:
194 $(SPHINXBUILD) -b linkcheck $(ALLSPHINXOPTS) $(BUILDDIR)/linkcheck
195 @echo
196 @echo "Link check complete; look for any errors in the above output " \
197 "or in $(BUILDDIR)/linkcheck/output.txt."
198
199.PHONY: doctest
200doctest:
201 $(SPHINXBUILD) -b doctest $(ALLSPHINXOPTS) $(BUILDDIR)/doctest
202 @echo "Testing of doctests in the sources finished, look at the " \
203 "results in $(BUILDDIR)/doctest/output.txt."
204
205.PHONY: coverage
206coverage:
207 $(SPHINXBUILD) -b coverage $(ALLSPHINXOPTS) $(BUILDDIR)/coverage
208 @echo "Testing of coverage in the sources finished, look at the " \
209 "results in $(BUILDDIR)/coverage/python.txt."
210
211.PHONY: xml
212xml:
213 $(SPHINXBUILD) -b xml $(ALLSPHINXOPTS) $(BUILDDIR)/xml
214 @echo
215 @echo "Build finished. The XML files are in $(BUILDDIR)/xml."
216
217.PHONY: pseudoxml
218pseudoxml:
219 $(SPHINXBUILD) -b pseudoxml $(ALLSPHINXOPTS) $(BUILDDIR)/pseudoxml
220 @echo
221 @echo "Build finished. The pseudo-XML files are in $(BUILDDIR)/pseudoxml."
222
223.PHONY: dummy
224dummy:
225 $(SPHINXBUILD) -b dummy $(ALLSPHINXOPTS) $(BUILDDIR)/dummy
226 @echo
227 @echo "Build finished. Dummy builder generates no files."
diff --git a/package.json b/package.json
index 0fc4172..0777ee3 100644
--- a/package.json
+++ b/package.json
@@ -14,7 +14,8 @@
14 ], 14 ],
15 "scripts": { 15 "scripts": {
16 "test": "jasmine", 16 "test": "jasmine",
17 "lint": "eslint ./" 17 "lint": "eslint ./",
18 "docs": "cd ./doc && make html"
18 }, 19 },
19 "repository": { 20 "repository": {
20 "type": "git", 21 "type": "git",