Skip to content

Commit

Permalink
update examples
Browse files Browse the repository at this point in the history
  • Loading branch information
75lb committed Sep 5, 2024
1 parent fe2c786 commit a3b88ff
Show file tree
Hide file tree
Showing 4 changed files with 19 additions and 18 deletions.
4 changes: 0 additions & 4 deletions example/explain-source.js
Original file line number Diff line number Diff line change
@@ -1,8 +1,4 @@
import jsdoc from 'jsdoc-api'
import util from 'node:util'
util.inspect.defaultOptions.depth = 6
util.inspect.defaultOptions.breakLength = process.stdout.columns
util.inspect.defaultOptions.maxArrayLength = Infinity

const data = await jsdoc.explain({ source: '/** example doclet */ \n var example = true' })
console.log(data)
4 changes: 0 additions & 4 deletions example/explain.js
Original file line number Diff line number Diff line change
@@ -1,8 +1,4 @@
import jsdoc from 'jsdoc-api'
import util from 'node:util'
util.inspect.defaultOptions.depth = 6
util.inspect.defaultOptions.breakLength = process.stdout.columns
util.inspect.defaultOptions.maxArrayLength = Infinity

const data = await jsdoc.explain({ files: process.argv.slice(2), cache: true })
console.log(data)
17 changes: 13 additions & 4 deletions example/using-config-explain.js
Original file line number Diff line number Diff line change
@@ -1,8 +1,17 @@
import jsdoc from 'jsdoc-api'
import util from 'node:util'
util.inspect.defaultOptions.depth = 6
util.inspect.defaultOptions.breakLength = process.stdout.columns
util.inspect.defaultOptions.maxArrayLength = Infinity

const data = await jsdoc.explain({ cache: true, configure: './example/using-config.json' })
console.log(data)

/*
The `using-config.json` file looks like this:
{
"source": {
"include": [ "example/using-config-input.js" ]
},
"opts": {
"destination": "./config-out/"
}
}
*/
12 changes: 6 additions & 6 deletions example/using-config.json
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
{
"source": {
"include": [ "example/using-config-input.js" ]
},
"opts": {
"destination": "./config-out/"
}
"source": {
"include": [ "example/using-config-input.js" ]
},
"opts": {
"destination": "./config-out/"
}
}

0 comments on commit a3b88ff

Please sign in to comment.