clean-jsdoc-theme
Advanced tools
Comparing version 4.2.14 to 4.2.15
const has = require('lodash/has'); | ||
const klawSync = require('klaw-sync'); | ||
const path = require('path') | ||
const fse = require('fs-extra') | ||
const path = require('path'); | ||
const fse = require('fs-extra'); | ||
const showdown = require('showdown'); | ||
@@ -19,3 +19,3 @@ | ||
return files.map((f) => f.path); | ||
}; | ||
} | ||
@@ -35,4 +35,11 @@ function copyToOutputFolder(filePath, outdir) { | ||
for (const filePath of filePathArray) { | ||
copyToOutputFolder(filePath, outdir); | ||
outputList.push(path.basename(filePath)); | ||
if (typeof filePath === 'string') { | ||
copyToOutputFolder(filePath, outdir); | ||
outputList.push(path.basename(filePath)); | ||
} else if (typeof filePath === 'object') { | ||
const { filepath, targets } = filePath; | ||
copyToOutputFolder(filepath, outdir); | ||
outputList.push({ filepath: path.basename(filepath), targets }); | ||
} | ||
} | ||
@@ -163,4 +170,2 @@ } | ||
module.exports = { | ||
@@ -183,3 +188,3 @@ buildFooter, | ||
getProcessedYield, | ||
lsSync | ||
} | ||
lsSync, | ||
}; |
@@ -6,5 +6,10 @@ { | ||
"source": { | ||
"include": ["./demo/src", "./README.md"] | ||
"include": [ | ||
"./demo/src", | ||
"./README.md" | ||
] | ||
}, | ||
"plugins": ["plugins/markdown"], | ||
"plugins": [ | ||
"plugins/markdown" | ||
], | ||
"opts": { | ||
@@ -22,5 +27,24 @@ "encoding": "utf8", | ||
"exclude_inherited": false, | ||
"include_css": ["./demo/src/assets/style.css"], | ||
"include_js": ["./demo/src/assets/script.js"], | ||
"static_dir": ["./demo/src/assets/png", "./example"], | ||
"include_css": [ | ||
{ | ||
"filepath": "./demo/src/assets/style.css", | ||
"targets": [ | ||
"AgentArray" | ||
] | ||
} | ||
], | ||
"include_js": [ | ||
"./demo/src/assets/script.js", | ||
{ | ||
"filepath": "./demo/src/assets/agentarray.js", | ||
"targets": [ | ||
"AgentArray", | ||
"tutorial-AgentArray_" | ||
] | ||
} | ||
], | ||
"static_dir": [ | ||
"./demo/src/assets/png", | ||
"./example" | ||
], | ||
"add_scripts": "function foo(){console.log('foo')} function bar() {console.log('bar')} bar(); foo();", | ||
@@ -54,6 +78,9 @@ "create_style": ".test-create-style{ background: red}", | ||
"codepen": { | ||
"enable_for": ["examples"], | ||
"enable_for": [ | ||
"examples" | ||
], | ||
"options": { | ||
"js_external": "https://code.jquery.com/jquery-3.6.0.min.js", | ||
"js_pre_processor": "babel" | ||
"js_pre_processor": "babel", | ||
"js": "import {AgentArray} from 'https://unpkg.com/agentscript@0.10.19/dist/agentscript.js'" | ||
} | ||
@@ -67,3 +94,5 @@ }, | ||
"staticFiles": { | ||
"include": ["./example"] | ||
"include": [ | ||
"./example" | ||
] | ||
} | ||
@@ -76,2 +105,2 @@ } | ||
} | ||
} | ||
} |
{ | ||
"name": "clean-jsdoc-theme", | ||
"version": "4.2.14", | ||
"version": "4.2.15", | ||
"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,0 +5,0 @@ "main": "publish.js", |
@@ -328,2 +328,3 @@ const _ = require('lodash'); | ||
docs: docs, | ||
filename, | ||
}; | ||
@@ -1020,2 +1021,3 @@ | ||
children: tutorial.children, | ||
filename, | ||
}; | ||
@@ -1022,0 +1024,0 @@ |
# clean-jsdoc-theme | ||
[![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.2.14-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) | ||
[![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.2.15-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) | ||
<br> | ||
@@ -483,2 +483,30 @@ | ||
If you want to add some script for some pages then you can do the following: | ||
```json | ||
"include_js": [ | ||
"./demo/src/assets/script.js", | ||
{ | ||
"filepath": "./demo/src/assets/random.js", | ||
"targets": [ | ||
"MyClass", | ||
"tutorial-MyClassTutorial" | ||
] | ||
} | ||
], | ||
``` | ||
Here target is the name of the generated html file (don't include `.html`). | ||
The above config will add `./demo/src/assets/script.js` to all the generated html files. However, it will | ||
add `./demo/src/assets/random.js` only to `MyClass.html` and `tutorial-MyClassTutorial.html` files. | ||
The file name of the generated html generally follows the following convention: | ||
- Class: class's name + `.html`. Ex `Alive.html` | ||
- Module: `module-` + module's name + `.html`. Ex: `module-SqlJs.html` | ||
- Tutorials: `tutorial-` + tutorial's filename + `.html` | ||
If you are not sure about the target name, then generate html for the first time, then look at the urls. | ||
### To ignore sorting | ||
@@ -485,0 +513,0 @@ |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
991803
77
9441
616