clean-jsdoc-theme 3.3.3 → 4.0.2

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.
Files changed (61) hide show
  1. package/.github/workflows/{codeql-analysis.yml → codeql.yml} +23 -18
  2. package/.github/workflows/greetings.yml +16 -0
  3. package/CHANGELOG.md +16 -0
  4. package/LICENSE +1 -1
  5. package/README.md +206 -311
  6. package/jsdoc-config.json +7 -5
  7. package/minify.js +52 -0
  8. package/package.json +10 -6
  9. package/publish.js +805 -871
  10. package/static/fonts/Inconsolata-Regular.ttf +0 -0
  11. package/static/fonts/OpenSans-Regular.ttf +0 -0
  12. package/static/fonts/WorkSans-Bold.ttf +0 -0
  13. package/static/scripts/core.js +576 -0
  14. package/static/scripts/core.min.js +23 -0
  15. package/static/scripts/resize.js +59 -54
  16. package/static/scripts/search.js +220 -53
  17. package/static/scripts/search.min.js +11 -0
  18. package/static/scripts/third-party/hljs-line-num.js +1 -0
  19. package/static/scripts/third-party/hljs-original.js +5162 -0
  20. package/static/scripts/third-party/hljs.js +1 -0
  21. package/static/scripts/third-party/popper.js +6 -0
  22. package/static/scripts/third-party/tippy.js +2 -0
  23. package/static/scripts/third-party/tocbot.js +1 -0
  24. package/static/styles/clean-jsdoc-theme-base.css +752 -190
  25. package/static/styles/clean-jsdoc-theme-dark.css +216 -133
  26. package/static/styles/clean-jsdoc-theme-light.css +239 -170
  27. package/static/styles/clean-jsdoc-theme.min.css +1 -0
  28. package/tmpl/container.tmpl +13 -12
  29. package/tmpl/details.tmpl +16 -16
  30. package/tmpl/examples.tmpl +3 -1
  31. package/tmpl/icons.tmpl +43 -5
  32. package/tmpl/layout.tmpl +62 -81
  33. package/tmpl/members.tmpl +1 -2
  34. package/tmpl/method.tmpl +4 -5
  35. package/tmpl/mobile-sidebar.tmpl +21 -0
  36. package/tmpl/navbar-actions.tmpl +19 -0
  37. package/tmpl/navbar-menu.tmpl +25 -0
  38. package/tmpl/navbar.tmpl +14 -0
  39. package/tmpl/returns.tmpl +1 -1
  40. package/tmpl/search.tmpl +17 -0
  41. package/tmpl/sidebar-items.tmpl +24 -0
  42. package/tmpl/sidebar-title.tmpl +10 -0
  43. package/tmpl/sidebar.tmpl +9 -0
  44. package/tmpl/source.tmpl +7 -2
  45. package/tmpl/toc.tmpl +4 -0
  46. package/helpers/navbarBuilder.js +0 -0
  47. package/static/fonts/MavenPro-Regular.ttf +0 -0
  48. package/static/fonts/Montserrat-Regular.ttf +0 -0
  49. package/static/fonts/Muli-Black.ttf +0 -0
  50. package/static/fonts/OFL-hind.txt +0 -93
  51. package/static/fonts/OFL-montserrat.txt +0 -93
  52. package/static/scripts/fix-code-block.js +0 -53
  53. package/static/scripts/fix-navbar.js +0 -25
  54. package/static/scripts/linenumber.js +0 -25
  55. package/static/scripts/misc.js +0 -217
  56. package/static/scripts/third-party/lang-css.js +0 -2
  57. package/static/scripts/third-party/prettify.js +0 -28
  58. package/static/styles/reset.css +0 -351
  59. package/static/styles/third-party/ionicons.min.css +0 -11
  60. package/static/styles/third-party/prettify-jsdoc.css +0 -111
  61. package/static/styles/third-party/prettify-tomorrow.css +0 -5
package/jsdoc-config.json CHANGED
@@ -8,14 +8,16 @@
8
8
  "plugins": ["plugins/markdown"],
9
9
  "opts": {
10
10
  "encoding": "utf8",
11
- "destination": "output/light",
11
+ "destination": "output/v4",
12
12
  "recurse": true,
13
13
  "template": "./",
14
14
  "tutorials": "./demo/src/tutorials",
15
15
  "theme_opts": {
16
- "theme": "light",
16
+ "search": true,
17
+ "base_url": "https://ankdev.me/clean-jsdoc-theme/v4/",
18
+ "default_theme": "dark",
17
19
  "title": "clean-jsdoc-theme",
18
- "footer": "Fork: <a href='https://github.com/ankitskvmdam/clean-jsdoc-theme'>https://github.com/ankitskvmdam/clean-jsdoc-theme</a>",
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>",
19
21
  "meta": [
20
22
  {
21
23
  "name": "Author",
@@ -53,8 +55,8 @@
53
55
  }
54
56
  }
55
57
  },
56
- "markdown.hardwrap": true,
57
58
  "markdown": {
58
- "hardwrap": true
59
+ "hardwrap": false,
60
+ "idInHeadings": true
59
61
  }
60
62
  }
package/minify.js ADDED
@@ -0,0 +1,52 @@
1
+ const uglify = require('uglify-js');
2
+ const csso = require('csso');
3
+ const path = require('path');
4
+ const fs = require('fs');
5
+
6
+ const pwd = path.join(__dirname);
7
+ const scriptsPath = path.join(pwd, 'static', 'scripts');
8
+ const cssPath = path.join(pwd, 'static', 'styles');
9
+
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
+ }
23
+ ];
24
+
25
+ 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')
29
+ ];
30
+
31
+ let css = '';
32
+
33
+ for (const p of cssFilePaths) {
34
+ css += fs.readFileSync(p, 'utf-8');
35
+ }
36
+
37
+ const minifiedCss = csso.minify(css, { restructure: false });
38
+
39
+ fs.writeFileSync(
40
+ path.join(cssPath, 'clean-jsdoc-theme.min.css'),
41
+ minifiedCss.css
42
+ );
43
+
44
+ for (const f of uglifyFiles) {
45
+ const data = fs.readFileSync(f.src, 'utf-8');
46
+
47
+ const out = uglify.minify(data, {
48
+ compress: true
49
+ });
50
+
51
+ fs.writeFileSync(f.dest, out.code);
52
+ }
package/package.json CHANGED
@@ -1,10 +1,10 @@
1
1
  {
2
2
  "name": "clean-jsdoc-theme",
3
- "version": "3.3.3",
3
+ "version": "4.0.2",
4
4
  "description": "A beautifully crafted theme/template for JSDoc 3. This theme/template looks and feels like a premium theme/template. This is a fully mobile responsive theme and also fully customizable theme.",
5
5
  "main": "publish.js",
6
6
  "scripts": {
7
- "test": "node node_modules/jsdoc/jsdoc.js -c jsdoc-config.json",
7
+ "build": "node minify.js && node node_modules/jsdoc/jsdoc.js -c jsdoc-config.json",
8
8
  "lint:js": "eslint . --ext .js",
9
9
  "lint:style": "stylelint static/styles/",
10
10
  "lint": "concurrently --prefix '{time}-{pid}' 'npm run lint:types' 'npm run lint:style'"
@@ -14,11 +14,11 @@
14
14
  "url": "git+https://github.com/ankitskvmdam/clean-jsdoc-theme.git"
15
15
  },
16
16
  "author": "Ank",
17
- "license": "ISC",
17
+ "license": "MIT",
18
18
  "bugs": {
19
19
  "url": "https://github.com/ankitskvmdam/clean-jsdoc-theme/issues"
20
20
  },
21
- "homepage": "https://ankdev.me/clean-jsdoc-theme/dark/index.html",
21
+ "homepage": "https://ankdev.me/clean-jsdoc-theme/v4/index.html",
22
22
  "peerDependencies": {
23
23
  "jsdoc": "3"
24
24
  },
@@ -32,15 +32,19 @@
32
32
  "devDependencies": {
33
33
  "@jsdoc/eslint-config": "^1.1.6",
34
34
  "concurrently": "^5.3.0",
35
+ "csso": "^5.0.3",
35
36
  "eslint": "^7.22.0",
36
37
  "prettier": "^2.2.1",
37
38
  "stylelint": "^13.12.0",
38
39
  "stylelint-config-sass-guidelines": "^7.1.0",
39
40
  "stylelint-config-standard": "^20.0.0",
40
41
  "stylelint-order": "^4.1.0",
41
- "stylelint-scss": "^3.19.0"
42
+ "stylelint-scss": "^3.19.0",
43
+ "uglify-js": "^3.16.0"
42
44
  },
43
45
  "dependencies": {
44
- "fs-extra": "^9.1.0"
46
+ "fs-extra": "^10.1.0",
47
+ "html-minifier": "^4.0.0",
48
+ "nanoid": "^3.3.4"
45
49
  }
46
50
  }