clean-jsdoc-theme 4.1.6 → 4.1.8

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -1,26 +1,33 @@
1
1
  # clean-jsdoc-theme
2
2
 
3
- [![Stars](https://img.shields.io/github/stars/ankitskvmdam/clean-jsdoc-theme)](https://github.com/ankitskvmdam/clean-jsdoc-theme) [![Fork](https://img.shields.io/github/forks/ankitskvmdam/clean-jsdoc-theme)](https://github.com/ankitskvmdam/clean-jsdoc-theme/fork) ![Version](https://img.shields.io/badge/version-4.1.5-005bff) [![Issues Open](https://img.shields.io/github/issues/ankitskvmdam/clean-jsdoc-theme)](https://github.com/ankitskvmdam/clean-jsdoc-theme/issues) [![Contributors](https://img.shields.io/github/contributors/ankitskvmdam/clean-jsdoc-theme)](https://github.com/ankitskvmdam/clean-jsdoc-theme/graphs/contributors) [![Build Status](https://travis-ci.org/ankitskvmdam/clean-jsdoc-theme.svg?branch=production)](https://travis-ci.org/ankitskvmdam/clean-jsdoc-theme) [![license](https://img.shields.io/github/license/ankitskvmdam/clean-jsdoc-theme)](https://github.com/ankitskvmdam/clean-jsdoc-theme/blob/master/LICENSE)
3
+ [![Stars](https://img.shields.io/github/stars/ankitskvmdam/clean-jsdoc-theme)](https://github.com/ankitskvmdam/clean-jsdoc-theme) [![Fork](https://img.shields.io/github/forks/ankitskvmdam/clean-jsdoc-theme)](https://github.com/ankitskvmdam/clean-jsdoc-theme/fork) ![Version](https://img.shields.io/badge/version-4.1.8-005bff) [![Issues Open](https://img.shields.io/github/issues/ankitskvmdam/clean-jsdoc-theme)](https://github.com/ankitskvmdam/clean-jsdoc-theme/issues) [![Contributors](https://img.shields.io/github/contributors/ankitskvmdam/clean-jsdoc-theme)](https://github.com/ankitskvmdam/clean-jsdoc-theme/graphs/contributors) [![Build Status](https://travis-ci.org/ankitskvmdam/clean-jsdoc-theme.svg?branch=production)](https://travis-ci.org/ankitskvmdam/clean-jsdoc-theme) [![license](https://img.shields.io/github/license/ankitskvmdam/clean-jsdoc-theme)](https://github.com/ankitskvmdam/clean-jsdoc-theme/blob/master/LICENSE)
4
4
  <br>
5
5
 
6
- clean-jsdoc-theme is a beautifully crafted theme for JSDoc 3. It is a clean and fully responsive theme with loads of customisation features.
6
+ `clean-jsdoc-theme` is a beautifully crafted theme for JSDoc 3. It is a clean and fully responsive theme with loads of
7
+ customisation features.
7
8
 
8
9
  Some salient features:
9
10
 
10
- 1. It supports most screens, i.e., desktops, laptops, iPad and mobile devices.
11
- 1. It has a premium-looking dark and light theme.
12
- 1. It minifies all the output HTML files (this helps in saving a few KBs).
13
- 1. It has search support. The search feature doesn't increase the size of output HTML files.
14
- 1. It updates regularly.
15
- 1. It is highly performant. [Check lighthouse report here](https://googlechrome.github.io/lighthouse/viewer/?psiurl=https%3A%2F%2Fankdev.me%2Fclean-jsdoc-theme%2Fv4%2Findex.html&strategy=desktop&category=performance&category=accessibility&category=best-practices&category=seo&category=pwa&utm_source=lh-chrome-ext).
11
+ 1. It supports most screens, i.e. desktops, laptops, iPad and mobile devices.
12
+ 2. It has a premium-looking dark and light theme.
13
+ 3. It minifies all the output HTML files (this helps in saving a few KBs).
14
+ 4. It has search support. The search feature doesn't increase the size of output HTML files.
15
+ 5. It is regularly updated.
16
+ 6. It is highly
17
+ performant. [Check lighthouse report here](https://googlechrome.github.io/lighthouse/viewer/?psiurl=https%3A%2F%2Fankdev.me%2Fclean-jsdoc-theme%2Fv4%2Findex.html&strategy=desktop&category=performance&category=accessibility&category=best-practices&category=seo&category=pwa&utm_source=lh-chrome-ext)
18
+ .
16
19
 
17
- We know that no library is perfect. That's why we are open to hearing from the community about the theme. For any suggestions, questions or bugs, feel free to create an <a href="https://github.com/ankitskvmdam/clean-jsdoc-theme/issues">issue</a>.
20
+ We know that no library is perfect. That's why we are open to hearing from the community about the theme. For any
21
+ suggestions, questions or bugs, feel free to create
22
+ an <a href="https://github.com/ankitskvmdam/clean-jsdoc-theme/issues">issue</a>.
18
23
 
19
24
  ## Demo
20
25
 
21
26
  1. To view this theme, visit [https://ankdev.me/clean-jsdoc-theme/v4](https://ankdev.me/clean-jsdoc-theme/v4).
22
27
 
23
- 1. If you want to see a demo repo to set up this theme, visit [https://github.com/ankitskvmdam/clean-jsdoc-theme-example](https://github.com/ankitskvmdam/clean-jsdoc-theme-example). This repo will guide you step by step on how to setup jsdoc and clean-jsdoc-theme in your existing repo.
28
+ 2. If you want to see a demo repo to set up this theme,
29
+ visit [clean-jsdoc-theme-example](https://github.com/ankitskvmdam/clean-jsdoc-theme-example). This repo will guide
30
+ you step by step on how to set up JSDoc and `clean-jsdoc-theme` in your existing repo.
24
31
 
25
32
  ## Screenshots
26
33
 
@@ -33,9 +40,9 @@ We know that no library is perfect. That's why we are open to hearing from the c
33
40
 
34
41
  ## Installation
35
42
 
36
- > Note you must have `node` and `npm` installed on your machine.
43
+ > Note : you must have `node` and `npm` installed on your machine.
37
44
 
38
- On your command line type
45
+ In a terminal, type :
39
46
 
40
47
  ```bash
41
48
  npm install clean-jsdoc-theme --save-dev
@@ -43,15 +50,20 @@ npm install clean-jsdoc-theme --save-dev
43
50
  yarn add clean-jsdoc-theme -D
44
51
  ```
45
52
 
46
- In your projects `package.json` file add a generate script. You need to run this script when you want to generate documentation.
53
+ In your projects `package.json` file, add a script to generate the documentation using JSDoc :
47
54
 
48
55
  ```json
49
- "script": {
56
+ "scripts": {
50
57
  "generate-docs": "jsdoc --configure jsdoc.json --verbose"
51
58
  }
52
59
  ```
53
60
 
54
- In your `jsdoc.json` file, add a template option.
61
+ > Heads Up! In the above `generate_docs` script, the value of the `--configure` option is `jsdoc.json`. Make sure
62
+ > the `jsdoc.json` file exists as it contains the JSDoc configuration. If you have your JSDoc config in a different
63
+ > file,
64
+ > replace `jsdoc.json` with its name.
65
+
66
+ In your `jsdoc.json` file, add a template option to use `clean-jsdoc-theme` instead of the default JSDoc theme:
55
67
 
56
68
  ```json
57
69
  "opts": {
@@ -59,15 +71,14 @@ In your `jsdoc.json` file, add a template option.
59
71
  }
60
72
  ```
61
73
 
62
- > Heads Up! In the `generate_docs` script, there is a configure option. The value of that option is `jsdoc.json`. Make sure the `jsdoc.json` file exists. `jsdoc.json` contains configurations for JSDoc. If you have your JSDoc config in a different file, replace `jsdoc.json` with the name of the file in which you have your JSDoc config.
63
-
64
- Now to generate docs run
74
+ Now, run the previously added script to generate the documentation :
65
75
 
66
76
  ```bash
67
77
  npm run generate-docs
68
78
  ```
69
79
 
70
- For more information look at [https://github.com/ankitskvmdam/clean-jsdoc-theme-example](https://github.com/ankitskvmdam/clean-jsdoc-theme-example)
80
+ For more information, look at the [clean-jsdoc-theme-example](https://github.com/ankitskvmdam/clean-jsdoc-theme-example)
81
+ repository.
71
82
 
72
83
  ## Example JSDoc Config
73
84
 
@@ -78,9 +89,7 @@ For more information look at [https://github.com/ankitskvmdam/clean-jsdoc-theme-
78
89
  "includePattern": ".js$",
79
90
  "excludePattern": "(node_modules/|docs)"
80
91
  },
81
-
82
92
  "plugins": ["plugins/markdown"],
83
-
84
93
  "opts": {
85
94
  "encoding": "utf8",
86
95
  "readme": "./README.md",
@@ -92,10 +101,10 @@ For more information look at [https://github.com/ankitskvmdam/clean-jsdoc-theme-
92
101
  "default_theme": "dark"
93
102
  }
94
103
  },
95
-
96
104
  "markdown": {
97
105
  "hardwrap": false,
98
- "idInHeadings": true // This is important for clean-jsdoc-theme, otherwise some features might not work.
106
+ "idInHeadings": true
107
+ // This is important for clean-jsdoc-theme, otherwise some features might not work.
99
108
  }
100
109
  }
101
110
  ```
@@ -104,7 +113,7 @@ For more information look at [https://github.com/ankitskvmdam/clean-jsdoc-theme-
104
113
 
105
114
  ### Set a default theme
106
115
 
107
- To set the default theme add the following in your jsodc config file:
116
+ To set the default theme, add the following in your JSDoc config file:
108
117
 
109
118
  ```json
110
119
  "theme_opts": {
@@ -114,7 +123,7 @@ To set the default theme add the following in your jsodc config file:
114
123
 
115
124
  ### Set base url
116
125
 
117
- If you want to set the base url:
126
+ To set the base url, add the following in your JSDoc config file:
118
127
 
119
128
  ```json
120
129
  "theme_opts": {
@@ -122,9 +131,9 @@ If you want to set the base url:
122
131
  }
123
132
  ```
124
133
 
125
- > Make sure to add the ending forward slash (`/`).
134
+ > Make sure to add a forward slash (`/`) at the end of the URL.
126
135
 
127
- The default value of the `base_url` is calculated using the following code:
136
+ The default value of `base_url` is computed with the following code:
128
137
 
129
138
  ```js
130
139
  const path = document.location.pathname;
@@ -133,20 +142,31 @@ const baseURL = path.substr(0, path.lastIndexOf('/') + 1);
133
142
 
134
143
  ### Add favicon
135
144
 
136
- To set favicon add the following in your jsodc config files.
145
+ To set a favicon, add the following in your JSDoc config file:
137
146
 
138
147
  ```json
139
148
  "theme_opts": {
140
- "favicon": "path/to/img"
149
+ "favicon": "path/to/img"
141
150
  }
142
-
143
151
  ```
144
152
 
145
- You can use [`static_dir`](#add-static-dir) option to copy all you static files to output dir and use that path in place of `path/to/img`.
153
+ You can use [`static_dir`](#add-static-dir) option to copy all you static files to output dir and use that path instead
154
+ of `path/to/img`.
155
+
156
+ ### Add homepage title
157
+
158
+ To add the title of the homepage use the `homepageTitle` property as follows:
159
+
160
+ ```json
161
+ "theme_opts": {
162
+ "homepageTitle": "Clean JSDoc theme"
163
+ }
164
+ ```
146
165
 
147
166
  ### Add title
148
167
 
149
- Both strings and HTML are accepted; use HTML to overwrite the default HTML, and a string to set a plaintext title. One example of this is below:
168
+ Both strings and HTML are accepted. Use HTML to overwrite the default HTML, and a string to set a plaintext title. One
169
+ example of this is below:
150
170
 
151
171
  ```json
152
172
  "theme_opts": {
@@ -154,7 +174,8 @@ Both strings and HTML are accepted; use HTML to overwrite the default HTML, and
154
174
  }
155
175
  ```
156
176
 
157
- You can use [`static_dir`](#add-static-dir) option to copy all you static files to output dir and use that path in place of `path/to/img`.
177
+ You can use [`static_dir`](#add-static-dir) option to copy all you static files to output dir and use that path in place
178
+ of `path/to/img`.
158
179
 
159
180
  ### Add navbar menu
160
181
 
@@ -162,7 +183,7 @@ To render extra link(s) in navbar. It accepts an array of objects:
162
183
 
163
184
  ```json
164
185
  "theme_opts": {
165
- "menu" : [
186
+ "menu": [
166
187
  {
167
188
  "title": "Website",
168
189
  "link": "https://ankdev.me/clean-jsdoc-theme/dark/",
@@ -177,7 +198,8 @@ To render extra link(s) in navbar. It accepts an array of objects:
177
198
  }
178
199
  ```
179
200
 
180
- `menu` is an array of object. Each object has five properties, out of which two are required (`title` and `link`). If any object doesn't have the required properties then you might expect an error.
201
+ `menu` is an array of objects. Each object has five properties, out of which two are required (`title` and `link`). If
202
+ an object doesn't have the required properties, then you might expect an error.
181
203
 
182
204
  <b>Properties</b>
183
205
 
@@ -191,7 +213,8 @@ To render extra link(s) in navbar. It accepts an array of objects:
191
213
 
192
214
  ### Sections
193
215
 
194
- There is an option to order the occurrence of sections in the sidebar. You can use this option to hide/remove any section.
216
+ There is also an option to add a meta tag to every generated HTML file. You can use the `meta` option to include a list
217
+ of `meta` tags into `head`.
195
218
 
196
219
  ```json
197
220
  "theme_opts": {
@@ -210,17 +233,18 @@ There is an option to order the occurrence of sections in the sidebar. You can u
210
233
  'Mixins',
211
234
  'Tutorials',
212
235
  'Interfaces',
213
- 'Global',
236
+ 'Global'
214
237
  ];
215
238
  ```
216
239
 
217
240
  ### Meta
218
241
 
219
- There is also an option to add meta tag to every generated HTML file. You can use `meta` option to include a list of `meta` tags into `head`.
242
+ There is also an option to add meta tag to every generated HTML file. You can use `meta` option to include a list
243
+ of `meta` tags into `head`.
220
244
 
221
245
  ```json
222
246
  "theme_opts": {
223
- "meta" : [
247
+ "meta": [
224
248
  {
225
249
  "name": "author",
226
250
  "content": "Ankit Kumar"
@@ -233,11 +257,16 @@ There is also an option to add meta tag to every generated HTML file. You can us
233
257
  }
234
258
  ```
235
259
 
236
- `meta` is an array of object. Each objects can have any valid combination of [HTML metadata attributes](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/meta#Attributes).
260
+ `meta` is an array of objects. Each objects can have any valid combination
261
+ of [HTML metadata attributes](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/meta#Attributes).
237
262
 
238
263
  ### Search
239
264
 
240
- By default, the search feature is available in the theme. If you don't want the search feature, you can do the following:
265
+ By default, the search feature is enabled in the theme.
266
+
267
+ > Make sure you have added the `base_url` option as well, otherwise your search query might fail.
268
+ >
269
+ > If you want to disable the search feature, you can do the following:
241
270
 
242
271
  ```json
243
272
  "theme_opts": {
@@ -245,14 +274,15 @@ By default, the search feature is available in the theme. If you don't want the
245
274
  }
246
275
  ```
247
276
 
248
- > Make sure you have added the `base_url` option as well, otherwise your search query might fail.
277
+ **How does the search work?**
249
278
 
250
- How does the search work?
251
- If the search feature is enabled, you'll see a `data` folder in the output. This `data` folder contains a JSON called `search.json`. There is a fetch request when user types anything in the search box. That means search data is only loaded if user wants to search anything.
279
+ If the search feature is enabled, you'll see a `data` folder in the output. This `data` folder contains a JSON
280
+ called `search.json`. There is a fetch request when user types anything in the search box. That means search data is
281
+ only loaded if user wants to search anything.
252
282
 
253
283
  ### CodePen
254
284
 
255
- > Note: Currently this feature is only enabled for the examples section.
285
+ > Note: currently, this feature is only enabled for the examples section.
256
286
 
257
287
  ```json
258
288
  "theme_opts": {
@@ -266,7 +296,8 @@ If the search feature is enabled, you'll see a `data` folder in the output. This
266
296
  }
267
297
  ```
268
298
 
269
- `options` can be any valid CodePen options. For more visit: [Codepen Prefill options](https://blog.codepen.io/documentation/prefill/#all-the-json-options-0)
299
+ `options` can be any valid CodePen option. For more
300
+ visit: [Codepen Prefill options](https://blog.codepen.io/documentation/prefill/#all-the-json-options-0)
270
301
 
271
302
  ### Add static dir
272
303
 
@@ -283,16 +314,17 @@ To include static files:
283
314
  To create custom style rules. Example:
284
315
 
285
316
  ```json
286
- "theme_opts" {
317
+ "theme_opts": {
287
318
  "create_style": ".sidebar-title { font-size: 2rem }"
288
319
  }
289
320
  ```
290
321
 
291
322
  ### Add style paths
292
323
 
293
- Use this option to add third party css library. If you want to add your own custom css file then consider using [Add custom css files](#add-custom-css-files)
324
+ Use this option to add third party css library. If you want to add your own custom css file then consider
325
+ using [Add custom css files](#add-custom-css-files)
294
326
 
295
- > Note: You have to pass an array of object, and object keys are actually the attributes which you want in you link tag.
327
+ > Note: you have to pass an array of objects. Each object key will be an attribute inside the generated script tag.
296
328
 
297
329
  Example:
298
330
 
@@ -311,14 +343,15 @@ Example:
311
343
  To include css files. Example:
312
344
 
313
345
  ```json
314
- "theme_opts" {
346
+ "theme_opts": {
315
347
  "include_css": ["./static/index.css", "./src/docs/index.css"]
316
348
  }
317
349
  ```
318
350
 
319
- > Note: You are not required to manually copy file to output dir
351
+ > Note: you are not required to manually copy file to output dir.
320
352
 
321
- It will include the css files to the output dir and also attach a link tag to the html pointing to the included css file.
353
+ It will include the css files to the output dir and also attach a link tag to the html pointing to the included css
354
+ file.
322
355
 
323
356
  ### Add scripts
324
357
 
@@ -332,9 +365,11 @@ To create custom scripts. Example:
332
365
 
333
366
  ### Add script paths
334
367
 
335
- Use this option to add third party js library. If you want to add your own custom script file then consider using [Add custom script files](#add-custom-script-files)
368
+ Use this option to add third party js library. If you want to add your own custom script file then consider
369
+ using [Add custom script files](#add-custom-script-files)
336
370
 
337
- > Note: You have to pass an array of object, and object keys are actually the attributes which you want in you script tag.
371
+ > Note: you have to pass an array of objects, and object keys are actually the attributes which you want in you script
372
+ > tag.
338
373
 
339
374
  Example:
340
375
 
@@ -350,9 +385,9 @@ Example:
350
385
 
351
386
  This will copy the static folder to the output dir.
352
387
 
353
- > Note: If the directory doesn't exists then you may get an error. Also directory is relative to your jsdoc config file.
388
+ > Note: if the directory doesn't exist then you may get an error. Also, directory is relative to your jsdoc config file.
354
389
 
355
- This will not flatten the directory it keep the directory structure as it is.
390
+ This will not flatten the directory. Directory structure will be kept as it is.
356
391
 
357
392
  ### Add custom script files
358
393
 
@@ -364,15 +399,15 @@ To include js files. Example:
364
399
  }
365
400
  ```
366
401
 
367
- > Note: You are not required to manually copy file to output dir
402
+ > Note: you are not required to manually copy file to output dir.
368
403
 
369
- It will include the js files to the output dir and also attach a script tag to the html pointing to the included js file.
404
+ It will include the js files to the output dir and also attach a script tag to the html pointing to the included js
405
+ file.
370
406
 
371
407
  ### Footer
372
408
 
373
409
  ```json
374
410
  "theme_opts": {
375
-
376
411
  "footer": "This is footer" // or <div class="footer-wrapper">This is a footer </div>
377
412
  }
378
413
  ```
@@ -392,6 +427,7 @@ This will remove all symbols (members, methods ...) that come from inherited par
392
427
  | name | default | use case | expected value(s) |
393
428
  | ------------------- | ------------------------------------------------------------------------------------------------------------ | -------------------------------------------------------------------------- | --------------------- |
394
429
  | `default_theme` | `"dark"` | To set the default theme | `"light" or "dark"` |
430
+ | `homepageTitle` | "Home" | To set the title of homepage | `string` |
395
431
  | `title` | `null` | To set the title | `HTML` or `string` |
396
432
  | `base_url` | `/` | To set the base URL | `string` |
397
433
  | `menu` | `null` | To render extra link in navbar | Array of Object(s) |
@@ -415,16 +451,17 @@ Don't forget to add the following in your jsdoc config file, otherwise toc will
415
451
  "markdown": {
416
452
  "idInHeadings": true // This is important for clean-jsdoc-theme, otherwise some features might not work.
417
453
  }
418
-
419
454
  ```
420
455
 
421
456
  ## Changelog
422
457
 
423
- Changelog is moved to [https://github.com/ankitskvmdam/clean-jsdoc-theme/blob/master/CHANGELOG.md](https://github.com/ankitskvmdam/clean-jsdoc-theme/blob/master/CHANGELOG.md)
458
+ Changelog is moved
459
+ to [https://github.com/ankitskvmdam/clean-jsdoc-theme/blob/master/CHANGELOG.md](https://github.com/ankitskvmdam/clean-jsdoc-theme/blob/master/CHANGELOG.md)
424
460
 
425
461
  ## Developing
426
462
 
427
- Before starting please go through our [contributing guide](https://github.com/ankitskvmdam/clean-jsdoc-theme/blob/master/CONTRIBUTING.md).
463
+ Before starting please go through
464
+ our [contributing guide](https://github.com/ankitskvmdam/clean-jsdoc-theme/blob/master/CONTRIBUTING.md).
428
465
 
429
466
  ```bash
430
467
  git clone https://github.com/ankitskvmdam/clean-jsdoc-theme.git
@@ -444,11 +481,14 @@ npm run build
444
481
 
445
482
  ## Thanks
446
483
 
447
- Thanks to [fuse.js](https://fusejs.io/), [hljs](https://highlightjs.org/),[tippy.js](https://tippyjs.bootcss.com/), and all awesome contributors.
484
+ Thanks to [fuse.js](https://fusejs.io/), [hljs](https://highlightjs.org/),[tippy.js](https://tippyjs.bootcss.com/), and
485
+ all awesome contributors.
448
486
 
449
487
  ## Contact
450
488
 
451
- If you like my work, then give me a <a href="https://github.com/ankitskvmdam/clean-jsdoc-theme" data-icon="octicon-star" aria-label="Star ankitskvmdam/clean-jsdoc-theme on GitHub">star</a>.
489
+ If you like my work, then give me
490
+ a <a href="https://github.com/ankitskvmdam/clean-jsdoc-theme" data-icon="octicon-star" aria-label="Star ankitskvmdam/clean-jsdoc-theme on GitHub">
491
+ star</a>.
452
492
 
453
493
  Mail me at: <a href="mailto:hello@ankdev.me">hello@ankdev.me</a> <br>
454
494
 
package/SECURITY.md CHANGED
@@ -6,7 +6,7 @@ Use this section to tell people about which versions of your project are
6
6
  currently being supported with security updates.
7
7
 
8
8
  | Version | Supported |
9
- | ------- | ------------------ |
9
+ |---------|--------------------|
10
10
  | 5.1.x | :white_check_mark: |
11
11
  | 5.0.x | :x: |
12
12
  | 4.0.x | :white_check_mark: |
@@ -18,4 +18,4 @@ Use this section to tell people how to report a vulnerability.
18
18
 
19
19
  Tell them where to go, how often they can expect to get an update on a
20
20
  reported vulnerability, what to expect if the vulnerability is accepted or
21
- declined, etc.
21
+ declined, etc.
package/css.js ADDED
@@ -0,0 +1,124 @@
1
+ var fs = require('jsdoc/fs');
2
+ var path = require('jsdoc/path');
3
+
4
+
5
+ var defaultCSSProps = {
6
+ // Font applied to headings.
7
+ headingFont: 'heading',
8
+ // Font applied to body/normal texts.
9
+ bodyFont: 'body',
10
+ // Font applied to code.
11
+ codeFont: 'code',
12
+ // The background color of selected text on the dark theme.
13
+ darkSelectionBg: '#ffce76',
14
+ // The text color of selected text on the dark theme.
15
+ darkSelectionTextColor: '#222',
16
+ // The background color of the body on the dark theme.
17
+ darkBodyBg: '#1a1a1a',
18
+ // The text color on the dark theme.
19
+ darkBodyTextColor: '#fff',
20
+ // Anchor's color on the dark theme.
21
+ darkAnchorColor: '#00bbff',
22
+ // Horizontal line color on the dark theme.
23
+ darkHrColor: '#222',
24
+ // Heading color on the dark theme.
25
+ darkHeadingColor: '#fff',
26
+ // Sidebar background color on the dark theme.
27
+ darkSidebarBg: '#222',
28
+ // Sidebar text color on the dark theme.
29
+ darkSidebarTextColor: '#999',
30
+ // Sidebar title's color on the dark theme.
31
+ darkSidebarTitleColor: '#999',
32
+ // Sidebar accordion title color on the dark theme.
33
+ darkSidebarAccordionTitleColor: '#999',
34
+ // Sidebar accordion title hover background color on the dark theme.
35
+ darkSidebarAccordionTitleHoverBg: '#252525',
36
+ // Sidebar accordion arrow color on the dark theme.
37
+ darkSidebarAccordionArrowColor: '#999',
38
+ // Sidebar accordion child background on the dark theme.
39
+ darkSidebarAccordionChildBg: '#292929',
40
+ // Sidebar accordion child item color on the dark theme.
41
+ darkSidebarAccordionChildItemColor: '#fff',
42
+ // Sidebar accordion child item hover background on the dark theme.
43
+ darkSidebarAccordionChildItemHoverBg: '#2c2c2c',
44
+ // Navbar background on the dark theme. Make sure it matches with the
45
+ // background color of the body, otherwise it will look a bit odd.
46
+ darkNavbarBg: '#1a1a1a',
47
+ // Icon button color on the dark theme.
48
+ darkIconButtonFillColor: '#999',
49
+ // Navbar item text color on the dark theme.
50
+ darkNavbarItemColor: '#999',
51
+ // Color of the icon on the tooltip for font size on the dark theme.
52
+ darkFontSizeTooltipIconColor: '#fff',
53
+ // Disabled color of the icon on the tooltip for font size on the dark theme.
54
+ darkFontSizeTooltipIconColorWhenDisabled: '#999',
55
+ // Icon button background when hovered on the dark theme.
56
+ darkIconButtonHoverBg: '#333',
57
+ // Icon button background when click is active on the dark theme.
58
+ darkIconButtonActiveBg: '#444',
59
+ // Sidebar on the dark theme.
60
+ darkSidebarColor: '#222',
61
+ // Sidebar on the dark theme.
62
+ darkSidebarColor: '#222',
63
+ // Sidebar on the dark theme.
64
+ darkSidebarColor: '#222',
65
+ // Sidebar on the dark theme.
66
+ darkSidebarColor: '#222',
67
+ // Sidebar on the dark theme.
68
+ darkSidebarColor: '#222',
69
+ // Sidebar on the dark theme.
70
+ darkSidebarColor: '#222',
71
+ // Sidebar on the dark theme.
72
+ darkSidebarColor: '#222',
73
+ // Sidebar on the dark theme.
74
+ darkSidebarColor: '#222',
75
+ // Sidebar on the dark theme.
76
+ darkSidebarColor: '#222',
77
+ // Sidebar on the dark theme.
78
+ darkSidebarColor: '#222',
79
+ // Sidebar on the dark theme.
80
+ darkSidebarColor: '#222',
81
+ // Sidebar on the dark theme.
82
+ darkSidebarColor: '#222',
83
+ // Sidebar on the dark theme.
84
+ darkSidebarColor: '#222',
85
+ // Sidebar on the dark theme.
86
+ darkSidebarColor: '#222',
87
+ // Sidebar on the dark theme.
88
+ darkSidebarColor: '#222',
89
+ // Sidebar on the dark theme.
90
+ darkSidebarColor: '#222',
91
+ // Sidebar on the dark theme.
92
+ darkSidebarColor: '#222',
93
+ // Sidebar on the dark theme.
94
+ darkSidebarColor: '#222',
95
+ // Sidebar on the dark theme.
96
+ darkSidebarColor: '#222',
97
+ // Sidebar on the dark theme.
98
+ darkSidebarColor: '#222',
99
+ // Sidebar on the dark theme.
100
+ darkSidebarColor: '#222',
101
+ // Sidebar on the dark theme.
102
+ darkSidebarColor: '#222',
103
+ // Sidebar on the dark theme.
104
+ darkSidebarColor: '#222',
105
+ // Sidebar on the dark theme.
106
+ darkSidebarColor: '#222',
107
+ // Sidebar on the dark theme.
108
+ darkSidebarColor: '#222',
109
+
110
+ }
111
+
112
+ /**
113
+ *
114
+ * @param {typeof defaultCSSProps} cssProps
115
+ * @returns {string} :root css rule.
116
+ */
117
+ function mapCSSPropsToCSSVar(cssProps) {
118
+ return ""
119
+ }
120
+
121
+ module.exports = function (outdir) {
122
+ fs.writeFileSync(path.join(outdir, 'new.css'), ":root{ --test-color: #007bff; }")
123
+
124
+ }
package/jsdoc-config.json CHANGED
@@ -14,6 +14,7 @@
14
14
  "tutorials": "./demo/src/tutorials",
15
15
  "theme_opts": {
16
16
  "search": true,
17
+ "homepageTitle": "Clean JSDoc Theme",
17
18
  "default_theme": "dark",
18
19
  "title": "clean-jsdoc-theme",
19
20
  "footer": "<div style='margin-bottom: 0.5rem;'>clean-jsdoc-theme</div> Fork: <a href='https://github.com/ankitskvmdam/clean-jsdoc-theme'>https://github.com/ankitskvmdam/clean-jsdoc-theme</a>",
package/minify.js CHANGED
@@ -8,45 +8,53 @@ const scriptsPath = path.join(pwd, 'static', 'scripts');
8
8
  const cssPath = path.join(pwd, 'static', 'styles');
9
9
 
10
10
  const uglifyFiles = [
11
- {
12
- src: path.join(scriptsPath, 'core.js'),
13
- dest: path.join(scriptsPath, 'core.min.js')
14
- },
15
- {
16
- src: path.join(scriptsPath, 'search.js'),
17
- dest: path.join(scriptsPath, 'search.min.js')
18
- },
19
- {
20
- src: path.join(scriptsPath, 'third-party', 'hljs-original.js'),
21
- dest: path.join(scriptsPath, 'third-party', 'hljs.js')
22
- }
11
+ {
12
+ src: path.join(scriptsPath, 'core.js'),
13
+ dest: path.join(scriptsPath, 'core.min.js')
14
+ },
15
+ {
16
+ src: path.join(scriptsPath, 'search.js'),
17
+ dest: path.join(scriptsPath, 'search.min.js')
18
+ },
19
+ {
20
+ src: path.join(scriptsPath, 'third-party', 'hljs-original.js'),
21
+ dest: path.join(scriptsPath, 'third-party', 'hljs.js')
22
+ },
23
+ {
24
+ src: path.join(scriptsPath, 'third-party', 'hljs-line-num-original.js'),
25
+ dest: path.join(scriptsPath, 'third-party', 'hljs-line-num.js')
26
+ },
27
+ {
28
+ src: path.join(scriptsPath, 'third-party', 'tocbot.js'),
29
+ dest: path.join(scriptsPath, 'third-party', 'tocbot.min.js')
30
+ }
23
31
  ];
24
32
 
25
33
  const cssFilePaths = [
26
- path.join(cssPath, 'clean-jsdoc-theme-base.css'),
27
- path.join(cssPath, 'clean-jsdoc-theme-dark.css'),
28
- path.join(cssPath, 'clean-jsdoc-theme-light.css')
34
+ path.join(cssPath, 'clean-jsdoc-theme-base.css'),
35
+ path.join(cssPath, 'clean-jsdoc-theme-dark.css'),
36
+ path.join(cssPath, 'clean-jsdoc-theme-light.css')
29
37
  ];
30
38
 
31
39
  let css = '';
32
40
 
33
41
  for (const p of cssFilePaths) {
34
- css += fs.readFileSync(p, 'utf-8');
42
+ css += fs.readFileSync(p, 'utf-8');
35
43
  }
36
44
 
37
45
  const minifiedCss = csso.minify(css, { restructure: false });
38
46
 
39
47
  fs.writeFileSync(
40
- path.join(cssPath, 'clean-jsdoc-theme.min.css'),
41
- minifiedCss.css
48
+ path.join(cssPath, 'clean-jsdoc-theme.min.css'),
49
+ minifiedCss.css
42
50
  );
43
51
 
44
52
  for (const f of uglifyFiles) {
45
- const data = fs.readFileSync(f.src, 'utf-8');
53
+ const data = fs.readFileSync(f.src, 'utf-8');
46
54
 
47
- const out = uglify.minify(data, {
48
- compress: true
49
- });
55
+ const out = uglify.minify(data, {
56
+ compress: true
57
+ });
50
58
 
51
- fs.writeFileSync(f.dest, out.code);
59
+ fs.writeFileSync(f.dest, out.code);
52
60
  }