Skip to content

Commit

Permalink
include script for agentarray
Browse files Browse the repository at this point in the history
  • Loading branch information
ankitskvmdam committed Nov 7, 2023
1 parent 6f3c648 commit c83ddb5
Show file tree
Hide file tree
Showing 2 changed files with 39 additions and 2 deletions.
26 changes: 26 additions & 0 deletions demo/src/assets/agentarray.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
function runSomeScript() {
console.log('%c AgentScript', 'font-weight: bold; font-size: 50px;color: red; text-shadow: 3px 3px 0 rgb(217,31,38) , 6px 6px 0 rgb(226,91,14) , 9px 9px 0 rgb(245,221,8) , 12px 12px 0 rgb(5,148,68) , 15px 15px 0 rgb(2,135,206) , 18px 18px 0 rgb(4,77,145) , 21px 21px 0 rgb(42,21,113)');
}

runSomeScript()


function addLiveCodeExampleForAgentArrayPage() {
const containerElement = document.querySelector('body article div')
const liveCodeContainer = document.createElement('div')

/**
* Adding some clean-jsdoc-theme class names
*/
liveCodeContainer.classList.add('method-member-container', 'flex', 'flex-col', 'w-100', 'overflow-auto', 'mt-20')


liveCodeContainer.innerHTML += `
<strong>Coding Playground</strong>
<iframe src="https://agentscript.org/editor/?example=slimemold" style="height:700px; width: 100%; background: white;" class="mt-20"></iframe>
`

containerElement.append(liveCodeContainer)
}

window.addEventListener('DOMContentLoaded', addLiveCodeExampleForAgentArrayPage);
15 changes: 13 additions & 2 deletions jsdoc-config.json
Original file line number Diff line number Diff line change
Expand Up @@ -24,11 +24,22 @@
"default_theme": "dark",
"exclude_inherited": false,
"include_css": [
"./demo/src/assets/style.css"
{
"filepath": "./demo/src/assets/style.css",
"targets": [
"AgentArray"
]
}
],
"include_js": [
"./demo/src/assets/script.js",
"./demo/src/assets/run-only-for-agentscript.js"
{
"filepath": "./demo/src/assets/agentarray.js",
"targets": [

This comment has been minimized.

Copy link
@ankitskvmdam

ankitskvmdam Nov 7, 2023

Author Owner

This script will only be added to the following files:

  1. AgentArray.html
  2. tutorial-AgentArray_.html

This comment has been minimized.

Copy link
@ankitskvmdam

ankitskvmdam Nov 7, 2023

Author Owner

The file name of the generated html generally follows the following convention:

  1. Class: class's name + .html. Ex Alive.html
  2. Module: module- + module's name + .html. Ex: module-SqlJs.html
  3. 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.

"AgentArray",
"tutorial-AgentArray_"
]
}
],
"static_dir": [
"./demo/src/assets/png",
Expand Down

0 comments on commit c83ddb5

Please sign in to comment.