Skip to content

Commit 073f613

Browse files
committed
Fixes #165
This change adds support for building JSDoc docs using nodejs. It also improves the JSDoc annotations used in the njs source code.
1 parent ed48f0f commit 073f613

12 files changed

+5173
-78
lines changed

.gitignore

+256-27
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,58 @@
1-
# Created by https://www.toptal.com/developers/gitignore/api/intellij
2-
# Edit at https://www.toptal.com/developers/gitignore?templates=intellij
1+
# Created by https://www.toptal.com/developers/gitignore/api/intellij+all,node,vim,emacs,macos
2+
# Edit at https://www.toptal.com/developers/gitignore?templates=intellij+all,node,vim,emacs,macos
33

4-
### Intellij ###
4+
### Emacs ###
5+
# -*- mode: gitignore; -*-
6+
*~
7+
\#*\#
8+
/.emacs.desktop
9+
/.emacs.desktop.lock
10+
*.elc
11+
auto-save-list
12+
tramp
13+
.\#*
14+
15+
# Org-mode
16+
.org-id-locations
17+
*_archive
18+
19+
# flymake-mode
20+
*_flymake.*
21+
22+
# eshell files
23+
/eshell/history
24+
/eshell/lastdir
25+
26+
# elpa packages
27+
/elpa/
28+
29+
# reftex files
30+
*.rel
31+
32+
# AUCTeX auto folder
33+
/auto/
34+
35+
# cask packages
36+
.cask/
37+
dist/
38+
39+
# Flycheck
40+
flycheck_*.el
41+
42+
# server auth directory
43+
/server/
44+
45+
# projectiles files
46+
.projectile
47+
48+
# directory configuration
49+
.dir-locals.el
50+
51+
# network security
52+
/network-security.data
53+
54+
55+
### Intellij+all ###
556
# Covers JetBrains IDEs: IntelliJ, RubyMine, PhpStorm, AppCode, PyCharm, CLion, Android Studio, WebStorm and Rider
657
# Reference: https://intellij-support.jetbrains.com/hc/en-us/articles/206544839
758

@@ -12,6 +63,9 @@
1263
.idea/**/dictionaries
1364
.idea/**/shelf
1465

66+
# AWS User-specific
67+
.idea/**/aws.xml
68+
1569
# Generated files
1670
.idea/**/contentModel.xml
1771

@@ -62,6 +116,9 @@ atlassian-ide-plugin.xml
62116
# Cursive Clojure plugin
63117
.idea/replstate.xml
64118

119+
# SonarLint plugin
120+
.idea/sonarlint/
121+
65122
# Crashlytics plugin (for Android Studio and IntelliJ)
66123
com_crashlytics_export_strings.xml
67124
crashlytics.properties
@@ -74,37 +131,209 @@ fabric.properties
74131
# Android studio 3.1+ serialized cache file
75132
.idea/caches/build_file_checksums.ser
76133

77-
### Intellij Patch ###
78-
# Comment Reason: https://github.com/joeblau/gitignore.io/issues/186#issuecomment-215987721
134+
### Intellij+all Patch ###
135+
# Ignore everything but code style settings and run configurations
136+
# that are supposed to be shared within teams.
137+
138+
.idea/*
139+
140+
!.idea/codeStyles
141+
!.idea/runConfigurations
142+
143+
### macOS ###
144+
# General
145+
.DS_Store
146+
.AppleDouble
147+
.LSOverride
148+
149+
# Icon must end with two \r
150+
Icon
151+
152+
153+
# Thumbnails
154+
._*
155+
156+
# Files that might appear in the root of a volume
157+
.DocumentRevisions-V100
158+
.fseventsd
159+
.Spotlight-V100
160+
.TemporaryItems
161+
.Trashes
162+
.VolumeIcon.icns
163+
.com.apple.timemachine.donotpresent
164+
165+
# Directories potentially created on remote AFP share
166+
.AppleDB
167+
.AppleDesktop
168+
Network Trash Folder
169+
Temporary Items
170+
.apdisk
171+
172+
### macOS Patch ###
173+
# iCloud generated files
174+
*.icloud
175+
176+
### Node ###
177+
# Logs
178+
logs
179+
*.log
180+
npm-debug.log*
181+
yarn-debug.log*
182+
yarn-error.log*
183+
lerna-debug.log*
184+
.pnpm-debug.log*
185+
186+
# Diagnostic reports (https://nodejs.org/api/report.html)
187+
report.[0-9]*.[0-9]*.[0-9]*.[0-9]*.json
188+
189+
# Runtime data
190+
pids
191+
*.pid
192+
*.seed
193+
*.pid.lock
194+
195+
# Directory for instrumented libs generated by jscoverage/JSCover
196+
lib-cov
197+
198+
# Coverage directory used by tools like istanbul
199+
coverage
200+
*.lcov
201+
202+
# nyc test coverage
203+
.nyc_output
204+
205+
# Grunt intermediate storage (https://gruntjs.com/creating-plugins#storing-task-files)
206+
.grunt
207+
208+
# Bower dependency directory (https://bower.io/)
209+
bower_components
210+
211+
# node-waf configuration
212+
.lock-wscript
213+
214+
# Compiled binary addons (https://nodejs.org/api/addons.html)
215+
build/Release
216+
217+
# Dependency directories
218+
node_modules/
219+
jspm_packages/
220+
221+
# Snowpack dependency directory (https://snowpack.dev/)
222+
web_modules/
223+
224+
# TypeScript cache
225+
*.tsbuildinfo
226+
227+
# Optional npm cache directory
228+
.npm
229+
230+
# Optional eslint cache
231+
.eslintcache
232+
233+
# Optional stylelint cache
234+
.stylelintcache
235+
236+
# Microbundle cache
237+
.rpt2_cache/
238+
.rts2_cache_cjs/
239+
.rts2_cache_es/
240+
.rts2_cache_umd/
241+
242+
# Optional REPL history
243+
.node_repl_history
244+
245+
# Output of 'npm pack'
246+
*.tgz
247+
248+
# Yarn Integrity file
249+
.yarn-integrity
250+
251+
# dotenv environment variable files
252+
.env
253+
.env.development.local
254+
.env.test.local
255+
.env.production.local
256+
.env.local
257+
258+
# parcel-bundler cache (https://parceljs.org/)
259+
.cache
260+
.parcel-cache
261+
262+
# Next.js build output
263+
.next
264+
out
265+
266+
# Nuxt.js build / generate output
267+
.nuxt
268+
dist
269+
270+
# Gatsby files
271+
.cache/
272+
# Comment in the public line in if your project uses Gatsby and not Next.js
273+
# https://nextjs.org/blog/next-9-1#public-directory-support
274+
# public
275+
276+
# vuepress build output
277+
.vuepress/dist
278+
279+
# vuepress v2.x temp and cache directory
280+
.temp
281+
282+
# Docusaurus cache and generated files
283+
.docusaurus
284+
285+
# Serverless directories
286+
.serverless/
287+
288+
# FuseBox cache
289+
.fusebox/
290+
291+
# DynamoDB Local files
292+
.dynamodb/
293+
294+
# TernJS port file
295+
.tern-port
296+
297+
# Stores VSCode versions used for testing VSCode extensions
298+
.vscode-test
299+
300+
# yarn v2
301+
.yarn/cache
302+
.yarn/unplugged
303+
.yarn/build-state.yml
304+
.yarn/install-state.gz
305+
.pnp.*
79306

80-
*.iml
81-
modules.xml
82-
.idea/misc.xml
83-
*.ipr
307+
### Node Patch ###
308+
# Serverless Webpack directories
309+
.webpack/
84310

85-
# Sonarlint plugin
86-
# https://plugins.jetbrains.com/plugin/7973-sonarlint
87-
.idea/**/sonarlint/
311+
# Optional stylelint cache
88312

89-
# SonarQube Plugin
90-
# https://plugins.jetbrains.com/plugin/7238-sonarqube-community-plugin
91-
.idea/**/sonarIssues.xml
313+
# SvelteKit build / generate output
314+
.svelte-kit
92315

93-
# Markdown Navigator plugin
94-
# https://plugins.jetbrains.com/plugin/7896-markdown-navigator-enhanced
95-
.idea/**/markdown-navigator.xml
96-
.idea/**/markdown-navigator-enh.xml
97-
.idea/**/markdown-navigator/
316+
### Vim ###
317+
# Swap
318+
[._]*.s[a-v][a-z]
319+
!*.svg # comment out if you don't need vector files
320+
[._]*.sw[a-p]
321+
[._]s[a-rt-v][a-z]
322+
[._]ss[a-gi-z]
323+
[._]sw[a-p]
98324

99-
# Cache file creation bug
100-
# See https://youtrack.jetbrains.com/issue/JBR-2257
101-
.idea/$CACHE_FILE$
325+
# Session
326+
Session.vim
327+
Sessionx.vim
102328

103-
# CodeStream plugin
104-
# https://plugins.jetbrains.com/plugin/12206-codestream
105-
.idea/codestream.xml
329+
# Temporary
330+
.netrwhist
331+
# Auto-generated tag files
332+
tags
333+
# Persistent undo
334+
[._]*.un~
106335

107-
# End of https://www.toptal.com/developers/gitignore/api/intellij
336+
# End of https://www.toptal.com/developers/gitignore/api/intellij+all,node,vim,emacs,macos
108337

109338
# Test data files
110339
test-settings.*

.tool-versions

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
nodejs 20.5.1

GNUmakefile

+10
Original file line numberDiff line numberDiff line change
@@ -22,3 +22,13 @@ help:
2222
.PHONY: test
2323
test: ## Run all tests
2424
$Q $(CURDIR)/test.sh --type oss --unprivileged false --latest-njs false
25+
26+
out:
27+
$(CURDIR)/node_modules/jsdoc/jsdoc.js -c $(CURDIR)/jsdoc/conf.json || true
28+
29+
.PHONY: jsdoc
30+
jsdoc: out ## Build JSDoc output
31+
32+
.PHONY: clean
33+
clean: ## Clean up build artifacts
34+
$Q rm -rf $(CURDIR)/out

README.md

+3-1
Original file line numberDiff line numberDiff line change
@@ -68,6 +68,7 @@ deployments/ contains files used for deployment technologies
6868
docs/ contains documentation about the project
6969
examples/ contains additional `Dockerfile` examples that extend the base
7070
configuration
71+
jsdoc/ JSDoc configuration files
7172
oss/ contains files used solely in NGINX OSS configurations
7273
plus/ contains files used solely in NGINX Plus configurations
7374
test/ contains automated tests for validang that the examples work
@@ -79,9 +80,10 @@ Dockerfile.buildkit.plus Dockerfile with the same configuration as Docke
7980
with support for hiding secrets using Docker's Buildkit
8081
Dockerfile.latest-njs Dockerfile that inherits from the last build of the gateway and
8182
then builds and installs the latest version of njs from source
82-
Dockerfile.unprivileged Dockerfiles that inherits from the last build of the gateway and
83+
Dockerfile.unprivileged Dockerfile that inherits from the last build of the gateway and
8384
makes the necessary modifications to allow running the container
8485
as a non root, unprivileged user.
86+
package.json Node.js package file used only for generating JSDoc
8587
settings.example Docker env file example
8688
standalone_ubuntu_oss_install.sh install script that will install the gateway as a Systemd service
8789
test.sh test launcher

0 commit comments

Comments
 (0)