Comparing version 3.0.0 to 4.0.0
@@ -164,14 +164,2 @@ 'use strict' | ||
this.tutorials = options.tutorials | ||
/** | ||
* Enable experimental parsing of `.html` files. | ||
* @type {boolean} | ||
*/ | ||
this.html = options.html | ||
if (this.html) { | ||
const path = require('path') | ||
this.configure = path.resolve(__dirname, 'html-conf.json') | ||
delete this.html | ||
} | ||
} | ||
@@ -178,0 +166,0 @@ } |
@@ -34,3 +34,3 @@ 'use strict' | ||
path.join(__dirname, '..'), | ||
path.join('node_modules', 'jsdoc-75lb', 'jsdoc.js') | ||
path.join('node_modules', 'jsdoc', 'jsdoc.js') | ||
) | ||
@@ -37,0 +37,0 @@ } |
{ | ||
"name": "jsdoc-api", | ||
"author": "Lloyd Brookes <75pound@gmail.com>", | ||
"version": "3.0.0", | ||
"version": "4.0.0", | ||
"description": "A programmatic interface for jsdoc", | ||
@@ -27,17 +27,17 @@ "repository": "https://github.com/jsdoc2md/jsdoc-api.git", | ||
"collect-json": "^1.0.8", | ||
"coveralls": "^2.11.16", | ||
"jsdoc-to-markdown": "^2.0.1", | ||
"rimraf": "^2.5.4", | ||
"test-runner": "~0.3.0" | ||
"coveralls": "^2.13.1", | ||
"jsdoc-to-markdown": "^3.0.0", | ||
"rimraf": "^2.6.1", | ||
"test-runner": "~0.4.0" | ||
}, | ||
"dependencies": { | ||
"array-back": "^1.0.4", | ||
"cache-point": "~0.4.0", | ||
"collect-all": "^1.0.2", | ||
"array-back": "^2.0.0", | ||
"cache-point": "^0.4.1", | ||
"collect-all": "^1.0.3", | ||
"file-set": "^1.1.1", | ||
"fs-then-native": "^2.0.0", | ||
"jsdoc-75lb": "^3.6.0", | ||
"object-to-spawn-args": "^1.1.0", | ||
"jsdoc": "^3.5.3", | ||
"object-to-spawn-args": "^1.1.1", | ||
"temp-path": "^1.0.0", | ||
"walk-back": "^2.0.1" | ||
"walk-back": "^3.0.0" | ||
}, | ||
@@ -44,0 +44,0 @@ "standard": { |
@@ -16,3 +16,2 @@ [![view on npm](http://img.shields.io/npm/v/jsdoc-api.svg)](https://www.npmjs.org/package/jsdoc-api) | ||
- Optional caching, dramatically speeding up future invocations with the same input. | ||
- Supports html input | ||
@@ -51,3 +50,3 @@ ## Synopsis | ||
* _static_ | ||
* [.cache](#module_jsdoc-api.cache) : <code>[cache-point](https://github.com/75lb/cache-point)</code> | ||
* [.cache](#module_jsdoc-api.cache) : [<code>cache-point</code>](https://github.com/75lb/cache-point) | ||
* [.explainSync([options])](#module_jsdoc-api.explainSync) ⇒ <code>Array.<object></code> | ||
@@ -58,3 +57,3 @@ * [.explain([options])](#module_jsdoc-api.explain) ⇒ <code>Promise</code> | ||
* [~JsdocOptions](#module_jsdoc-api..JsdocOptions) | ||
* [.files](#module_jsdoc-api..JsdocOptions.JsdocOptions+files) : <code>string</code> | <code>Array.<string></code> | ||
* [.files](#module_jsdoc-api..JsdocOptions.JsdocOptions+files) : <code>string</code> \| <code>Array.<string></code> | ||
* [.source](#module_jsdoc-api..JsdocOptions.JsdocOptions+source) : <code>string</code> | ||
@@ -74,10 +73,9 @@ * [.cache](#module_jsdoc-api..JsdocOptions.JsdocOptions+cache) : <code>boolean</code> | ||
* [.tutorials](#module_jsdoc-api..JsdocOptions.JsdocOptions+tutorials) : <code>string</code> | ||
* [.html](#module_jsdoc-api..JsdocOptions.JsdocOptions+html) : <code>boolean</code> | ||
<a name="module_jsdoc-api.cache"></a> | ||
### jsdoc.cache : <code>[cache-point](https://github.com/75lb/cache-point)</code> | ||
### jsdoc.cache : [<code>cache-point</code>](https://github.com/75lb/cache-point) | ||
The [cache-point](https://github.com/75lb/cache-point) instance used when `cache: true` is specified on `.explain()` or `.explainSync()`. | ||
**Kind**: static property of <code>[jsdoc-api](#module_jsdoc-api)</code> | ||
**Kind**: static property of [<code>jsdoc-api</code>](#module_jsdoc-api) | ||
<a name="module_jsdoc-api.explainSync"></a> | ||
@@ -88,3 +86,3 @@ | ||
**Kind**: static method of <code>[jsdoc-api](#module_jsdoc-api)</code> | ||
**Kind**: static method of [<code>jsdoc-api</code>](#module_jsdoc-api) | ||
**Prerequisite**: Requires node v0.12 or above | ||
@@ -94,3 +92,3 @@ | ||
| --- | --- | | ||
| [options] | <code>[JsdocOptions](#module_jsdoc-api..JsdocOptions)</code> | | ||
| [options] | [<code>JsdocOptions</code>](#module_jsdoc-api..JsdocOptions) | | ||
@@ -102,3 +100,3 @@ <a name="module_jsdoc-api.explain"></a> | ||
**Kind**: static method of <code>[jsdoc-api](#module_jsdoc-api)</code> | ||
**Kind**: static method of [<code>jsdoc-api</code>](#module_jsdoc-api) | ||
**Fulfil**: <code>object[]</code> - jsdoc explain output | ||
@@ -108,3 +106,3 @@ | ||
| --- | --- | | ||
| [options] | <code>[JsdocOptions](#module_jsdoc-api..JsdocOptions)</code> | | ||
| [options] | [<code>JsdocOptions</code>](#module_jsdoc-api..JsdocOptions) | | ||
@@ -116,3 +114,3 @@ <a name="module_jsdoc-api.renderSync"></a> | ||
**Kind**: static method of <code>[jsdoc-api](#module_jsdoc-api)</code> | ||
**Kind**: static method of [<code>jsdoc-api</code>](#module_jsdoc-api) | ||
**Prerequisite**: Requires node v0.12 or above | ||
@@ -122,3 +120,3 @@ | ||
| --- | --- | | ||
| [options] | <code>[JsdocOptions](#module_jsdoc-api..JsdocOptions)</code> | | ||
| [options] | [<code>JsdocOptions</code>](#module_jsdoc-api..JsdocOptions) | | ||
@@ -131,9 +129,9 @@ **Example** | ||
### jsdoc~JsdocOptions | ||
### jsdoc-api~JsdocOptions | ||
The jsdoc options, common for all operations. | ||
**Kind**: inner class of <code>[jsdoc-api](#module_jsdoc-api)</code> | ||
**Kind**: inner class of [<code>jsdoc-api</code>](#module_jsdoc-api) | ||
* [~JsdocOptions](#module_jsdoc-api..JsdocOptions) | ||
* [.files](#module_jsdoc-api..JsdocOptions.JsdocOptions+files) : <code>string</code> | <code>Array.<string></code> | ||
* [.files](#module_jsdoc-api..JsdocOptions.JsdocOptions+files) : <code>string</code> \| <code>Array.<string></code> | ||
* [.source](#module_jsdoc-api..JsdocOptions.JsdocOptions+source) : <code>string</code> | ||
@@ -153,10 +151,9 @@ * [.cache](#module_jsdoc-api..JsdocOptions.JsdocOptions+cache) : <code>boolean</code> | ||
* [.tutorials](#module_jsdoc-api..JsdocOptions.JsdocOptions+tutorials) : <code>string</code> | ||
* [.html](#module_jsdoc-api..JsdocOptions.JsdocOptions+html) : <code>boolean</code> | ||
<a name="module_jsdoc-api..JsdocOptions.JsdocOptions+files"></a> | ||
#### options.files : <code>string</code> | <code>Array.<string></code> | ||
#### options.files : <code>string</code> \| <code>Array.<string></code> | ||
One or more filenames to process. Either this or `source` must be supplied. | ||
**Kind**: instance property of <code>[JsdocOptions](#module_jsdoc-api..JsdocOptions)</code> | ||
**Kind**: instance property of [<code>JsdocOptions</code>](#module_jsdoc-api..JsdocOptions) | ||
<a name="module_jsdoc-api..JsdocOptions.JsdocOptions+source"></a> | ||
@@ -167,3 +164,3 @@ | ||
**Kind**: instance property of <code>[JsdocOptions](#module_jsdoc-api..JsdocOptions)</code> | ||
**Kind**: instance property of [<code>JsdocOptions</code>](#module_jsdoc-api..JsdocOptions) | ||
<a name="module_jsdoc-api..JsdocOptions.JsdocOptions+cache"></a> | ||
@@ -174,3 +171,3 @@ | ||
**Kind**: instance property of <code>[JsdocOptions](#module_jsdoc-api..JsdocOptions)</code> | ||
**Kind**: instance property of [<code>JsdocOptions</code>](#module_jsdoc-api..JsdocOptions) | ||
<a name="module_jsdoc-api..JsdocOptions.JsdocOptions+access"></a> | ||
@@ -181,3 +178,3 @@ | ||
**Kind**: instance property of <code>[JsdocOptions](#module_jsdoc-api..JsdocOptions)</code> | ||
**Kind**: instance property of [<code>JsdocOptions</code>](#module_jsdoc-api..JsdocOptions) | ||
<a name="module_jsdoc-api..JsdocOptions.JsdocOptions+configure"></a> | ||
@@ -188,3 +185,3 @@ | ||
**Kind**: instance property of <code>[JsdocOptions](#module_jsdoc-api..JsdocOptions)</code> | ||
**Kind**: instance property of [<code>JsdocOptions</code>](#module_jsdoc-api..JsdocOptions) | ||
<a name="module_jsdoc-api..JsdocOptions.JsdocOptions+destination"></a> | ||
@@ -195,3 +192,3 @@ | ||
**Kind**: instance property of <code>[JsdocOptions](#module_jsdoc-api..JsdocOptions)</code> | ||
**Kind**: instance property of [<code>JsdocOptions</code>](#module_jsdoc-api..JsdocOptions) | ||
<a name="module_jsdoc-api..JsdocOptions.JsdocOptions+encoding"></a> | ||
@@ -202,3 +199,3 @@ | ||
**Kind**: instance property of <code>[JsdocOptions](#module_jsdoc-api..JsdocOptions)</code> | ||
**Kind**: instance property of [<code>JsdocOptions</code>](#module_jsdoc-api..JsdocOptions) | ||
<a name="module_jsdoc-api..JsdocOptions.JsdocOptions+private"></a> | ||
@@ -209,3 +206,3 @@ | ||
**Kind**: instance property of <code>[JsdocOptions](#module_jsdoc-api..JsdocOptions)</code> | ||
**Kind**: instance property of [<code>JsdocOptions</code>](#module_jsdoc-api..JsdocOptions) | ||
<a name="module_jsdoc-api..JsdocOptions.JsdocOptions+package"></a> | ||
@@ -216,3 +213,3 @@ | ||
**Kind**: instance property of <code>[JsdocOptions](#module_jsdoc-api..JsdocOptions)</code> | ||
**Kind**: instance property of [<code>JsdocOptions</code>](#module_jsdoc-api..JsdocOptions) | ||
<a name="module_jsdoc-api..JsdocOptions.JsdocOptions+pedantic"></a> | ||
@@ -223,3 +220,3 @@ | ||
**Kind**: instance property of <code>[JsdocOptions](#module_jsdoc-api..JsdocOptions)</code> | ||
**Kind**: instance property of [<code>JsdocOptions</code>](#module_jsdoc-api..JsdocOptions) | ||
<a name="module_jsdoc-api..JsdocOptions.JsdocOptions+query"></a> | ||
@@ -230,3 +227,3 @@ | ||
**Kind**: instance property of <code>[JsdocOptions](#module_jsdoc-api..JsdocOptions)</code> | ||
**Kind**: instance property of [<code>JsdocOptions</code>](#module_jsdoc-api..JsdocOptions) | ||
<a name="module_jsdoc-api..JsdocOptions.JsdocOptions+recurse"></a> | ||
@@ -237,3 +234,3 @@ | ||
**Kind**: instance property of <code>[JsdocOptions](#module_jsdoc-api..JsdocOptions)</code> | ||
**Kind**: instance property of [<code>JsdocOptions</code>](#module_jsdoc-api..JsdocOptions) | ||
<a name="module_jsdoc-api..JsdocOptions.JsdocOptions+readme"></a> | ||
@@ -244,3 +241,3 @@ | ||
**Kind**: instance property of <code>[JsdocOptions](#module_jsdoc-api..JsdocOptions)</code> | ||
**Kind**: instance property of [<code>JsdocOptions</code>](#module_jsdoc-api..JsdocOptions) | ||
<a name="module_jsdoc-api..JsdocOptions.JsdocOptions+template"></a> | ||
@@ -251,3 +248,3 @@ | ||
**Kind**: instance property of <code>[JsdocOptions](#module_jsdoc-api..JsdocOptions)</code> | ||
**Kind**: instance property of [<code>JsdocOptions</code>](#module_jsdoc-api..JsdocOptions) | ||
<a name="module_jsdoc-api..JsdocOptions.JsdocOptions+tutorials"></a> | ||
@@ -258,12 +255,6 @@ | ||
**Kind**: instance property of <code>[JsdocOptions](#module_jsdoc-api..JsdocOptions)</code> | ||
<a name="module_jsdoc-api..JsdocOptions.JsdocOptions+html"></a> | ||
**Kind**: instance property of [<code>JsdocOptions</code>](#module_jsdoc-api..JsdocOptions) | ||
#### options.html : <code>boolean</code> | ||
Enable experimental parsing of `.html` files. | ||
**Kind**: instance property of <code>[JsdocOptions](#module_jsdoc-api..JsdocOptions)</code> | ||
* * * | ||
© 2015-17 Lloyd Brookes \<75pound@gmail.com\>. Documented by [jsdoc-to-markdown](https://github.com/jsdoc2md/jsdoc-to-markdown). |
'use strict' | ||
var TestRunner = require('test-runner') | ||
var jsdoc = require('../') | ||
var Fixture = require('./lib/fixture') | ||
var path = require('path') | ||
var fs = require('fs-then-native') | ||
var a = require('assert') | ||
const TestRunner = require('test-runner') | ||
const jsdoc = require('../') | ||
const Fixture = require('./lib/fixture') | ||
const path = require('path') | ||
const fs = require('fs-then-native') | ||
const a = require('assert') | ||
var runner = new TestRunner() | ||
const runner = new TestRunner() | ||
if (require('child_process').spawnSync) { | ||
runner.test('.explainSync({ files, cache: true })', function () { | ||
var f = new Fixture('class-all') | ||
jsdoc.cache.dir = 'tmp/cache-sync' | ||
jsdoc.cache.clear() | ||
var output = jsdoc.explainSync({ files: f.sourcePath, cache: true }) | ||
var expectedOutput = f.getExpectedOutput(output) | ||
runner.test('.explainSync({ files, cache: true })', function () { | ||
const f = new Fixture('class-all') | ||
jsdoc.cache.dir = 'tmp/cache-sync' | ||
jsdoc.cache.clear().catch(err => { /* ignore */ }) | ||
const output = jsdoc.explainSync({ files: f.sourcePath, cache: true }) | ||
const expectedOutput = f.getExpectedOutput(output) | ||
a.ok(typeof output === 'object') | ||
a.deepEqual(output, expectedOutput) | ||
}) | ||
} | ||
a.ok(typeof output === 'object') | ||
a.deepEqual(output, expectedOutput) | ||
}) | ||
runner.test('.explain({ files, cache: true })', function () { | ||
var f = new Fixture('class-all') | ||
const f = new Fixture('class-all') | ||
jsdoc.cache.dir = 'tmp/cache' | ||
jsdoc.cache.clear() | ||
jsdoc.cache.clear().catch(err => { /* ignore */ }) | ||
return jsdoc.explain({ files: f.sourcePath, cache: true }) | ||
.then(function (output) { | ||
var cachedFiles = fs.readdirSync(jsdoc.cache.dir) | ||
const cachedFiles = fs.readdirSync(jsdoc.cache.dir) | ||
.map(function (file) { | ||
@@ -36,3 +34,3 @@ return path.resolve(jsdoc.cache.dir, file) | ||
a.deepEqual(output, f.getExpectedOutput(output)) | ||
var cachedData = JSON.parse(fs.readFileSync(cachedFiles[0], 'utf8')) | ||
const cachedData = JSON.parse(fs.readFileSync(cachedFiles[0], 'utf8')) | ||
Fixture.removeFileSpecificData(cachedData) | ||
@@ -39,0 +37,0 @@ a.deepEqual( |
'use strict' | ||
var TestRunner = require('test-runner') | ||
var jsdoc = require('../') | ||
var Fixture = require('./lib/fixture') | ||
var path = require('path') | ||
var a = require('assert') | ||
const TestRunner = require('test-runner') | ||
const jsdoc = require('../') | ||
const Fixture = require('./lib/fixture') | ||
const path = require('path') | ||
const a = require('assert') | ||
var runner = new TestRunner() | ||
const runner = new TestRunner() | ||
/* only test on a node version with spawnSync */ | ||
if (require('child_process').spawnSync) { | ||
runner.test('.explainSync({ files })', function () { | ||
var f = new Fixture('class-all') | ||
var output = jsdoc.explainSync({ files: f.sourcePath }) | ||
var expectedOutput = f.getExpectedOutput(output) | ||
runner.test('.explainSync({ files })', function () { | ||
const f = new Fixture('class-all') | ||
const output = jsdoc.explainSync({ files: f.sourcePath }) | ||
const expectedOutput = f.getExpectedOutput(output) | ||
a.ok(typeof output === 'object') | ||
a.deepEqual(output, expectedOutput) | ||
}) | ||
a.ok(typeof output === 'object') | ||
a.deepEqual(output, expectedOutput) | ||
}) | ||
runner.test('.explainSync({ source })', function () { | ||
var f = new Fixture('class-all') | ||
var output = jsdoc.explainSync({ source: f.getSource() }) | ||
var expectedOutput = f.getExpectedOutput(output) | ||
runner.test('.explainSync({ source })', function () { | ||
const f = new Fixture('class-all') | ||
const output = jsdoc.explainSync({ source: f.getSource() }) | ||
const expectedOutput = f.getExpectedOutput(output) | ||
a.ok(typeof output === 'object') | ||
a.deepEqual(output, expectedOutput) | ||
}) | ||
a.ok(typeof output === 'object') | ||
a.deepEqual(output, expectedOutput) | ||
}) | ||
runner.test('.explainSync({ source }), defaults', function () { | ||
var output = jsdoc.explainSync({ source: '/** example doclet */ \n var example = true' }) | ||
a.strictEqual(output[0].description, 'example doclet') | ||
}) | ||
runner.test('.explainSync({ source }), defaults', function () { | ||
const output = jsdoc.explainSync({ source: '/** example doclet */ \n const example = true' }) | ||
a.strictEqual(output[0].description, 'example doclet') | ||
}) | ||
runner.test('.explainSync: no valid files', function () { | ||
a.throws( | ||
function () { | ||
jsdoc.explainSync({ files: 'package.json' }) | ||
}, | ||
function (err) { | ||
return err.name === 'JSDOC_ERROR' | ||
} | ||
) | ||
}) | ||
runner.test('.explainSync: no valid files', function () { | ||
a.throws( | ||
function () { | ||
jsdoc.explainSync({ files: 'package.json' }) | ||
}, | ||
function (err) { | ||
return err.name === 'JSDOC_ERROR' | ||
} | ||
) | ||
}) | ||
runner.test('.explainSync: missing files', function () { | ||
a.throws( | ||
function () { | ||
jsdoc.explainSync({ files: 'oyutigbl' }) | ||
}, | ||
function (err) { | ||
return err.name === 'JSDOC_ERROR' | ||
} | ||
) | ||
}) | ||
runner.test('.explainSync: missing files', function () { | ||
a.throws( | ||
function () { | ||
jsdoc.explainSync({ files: 'oyutigbl' }) | ||
}, | ||
function (err) { | ||
return err.name === 'JSDOC_ERROR' | ||
} | ||
) | ||
}) | ||
runner.test('.explainSync: invalid doclet syntax', function () { | ||
a.throws( | ||
function () { | ||
var input = path.resolve(__dirname, 'fixture', 'buggy', 'bad-doclet-syntax.js') | ||
jsdoc.explainSync({ files: input }) | ||
}, | ||
function (err) { | ||
return err.name === 'JSDOC_ERROR' | ||
} | ||
) | ||
}) | ||
} | ||
runner.test('.explainSync: invalid doclet syntax', function () { | ||
a.throws( | ||
function () { | ||
const input = path.resolve(__dirname, 'fixture', 'buggy', 'bad-doclet-syntax.js') | ||
jsdoc.explainSync({ files: input }) | ||
}, | ||
function (err) { | ||
return err.name === 'JSDOC_ERROR' | ||
} | ||
) | ||
}) |
'use strict' | ||
var TestRunner = require('test-runner') | ||
var jsdoc = require('../') | ||
var Fixture = require('./lib/fixture') | ||
var path = require('path') | ||
var a = require('assert') | ||
const TestRunner = require('test-runner') | ||
const jsdoc = require('../') | ||
const Fixture = require('./lib/fixture') | ||
const path = require('path') | ||
const a = require('assert') | ||
var runner = new TestRunner() | ||
const runner = new TestRunner() | ||
runner.test('.explain({ files })', function () { | ||
var f = new Fixture('class-all') | ||
const f = new Fixture('class-all') | ||
return jsdoc.explain({ files: f.sourcePath }) | ||
@@ -19,3 +19,3 @@ .then(function (output) { | ||
runner.test('.explain({ source })', function () { | ||
var f = new Fixture('class-all') | ||
const f = new Fixture('class-all') | ||
return jsdoc.explain({ source: f.getSource() }) | ||
@@ -38,3 +38,3 @@ .then(function (output) { | ||
runner.test('.explain: invalid doclet syntax', function () { | ||
var input = path.resolve(__dirname, 'fixture', 'buggy', 'bad-doclet-syntax.js') | ||
const input = path.resolve(__dirname, 'fixture', 'buggy', 'bad-doclet-syntax.js') | ||
return jsdoc.explain({ files: input }) | ||
@@ -41,0 +41,0 @@ .then(function () { |
@@ -11,5 +11,6 @@ [ | ||
"lineno": 16, | ||
"path": "/Users/lloyd/Documents/jsdoc2md/testbed/build/jsdoc/class-all", | ||
"columnno": 0, | ||
"path": "/Users/lloydb/Documents/jsdoc2md/jsdoc-api/test/fixture/class-all", | ||
"code": { | ||
"id": "astnode100000001", | ||
"id": "astnode100000002", | ||
"name": "All", | ||
@@ -75,5 +76,6 @@ "type": "FunctionDeclaration", | ||
"lineno": 23, | ||
"path": "/Users/lloyd/Documents/jsdoc2md/testbed/build/jsdoc/class-all", | ||
"columnno": 2, | ||
"path": "/Users/lloydb/Documents/jsdoc2md/jsdoc-api/test/fixture/class-all", | ||
"code": { | ||
"id": "astnode100000007", | ||
"id": "astnode100000008", | ||
"name": "this.topping", | ||
@@ -108,5 +110,6 @@ "type": "Literal", | ||
"lineno": 28, | ||
"path": "/Users/lloyd/Documents/jsdoc2md/testbed/build/jsdoc/class-all", | ||
"columnno": 2, | ||
"path": "/Users/lloydb/Documents/jsdoc2md/jsdoc-api/test/fixture/class-all", | ||
"code": { | ||
"id": "astnode100000013", | ||
"id": "astnode100000014", | ||
"name": "this.size", | ||
@@ -134,5 +137,6 @@ "type": "Literal", | ||
"lineno": 44, | ||
"path": "/Users/lloyd/Documents/jsdoc2md/testbed/build/jsdoc/class-all", | ||
"columnno": 0, | ||
"path": "/Users/lloydb/Documents/jsdoc2md/jsdoc-api/test/fixture/class-all", | ||
"code": { | ||
"id": "astnode100000019", | ||
"id": "astnode100000020", | ||
"name": "All.prototype.allThings", | ||
@@ -204,5 +208,6 @@ "type": "FunctionExpression", | ||
"lineno": 48, | ||
"path": "/Users/lloyd/Documents/jsdoc2md/testbed/build/jsdoc/class-all", | ||
"columnno": 6, | ||
"path": "/Users/lloydb/Documents/jsdoc2md/jsdoc-api/test/fixture/class-all", | ||
"code": { | ||
"id": "astnode100000030", | ||
"id": "astnode100000031", | ||
"name": "some", | ||
@@ -218,3 +223,4 @@ "type": "Literal", | ||
"memberof": "All#allThings", | ||
"scope": "inner" | ||
"scope": "inner", | ||
"params": [] | ||
}, | ||
@@ -225,5 +231,5 @@ { | ||
"files": [ | ||
"/Users/lloyd/Documents/jsdoc2md/testbed/build/jsdoc/class-all/0-src.js" | ||
"/Users/lloydb/Documents/jsdoc2md/jsdoc-api/test/fixture/class-all/0-src.js" | ||
] | ||
} | ||
] | ||
] |
'use strict' | ||
var TestRunner = require('test-runner') | ||
var jsdoc = require('../') | ||
var Fixture = require('./lib/fixture') | ||
var fs = require('fs') | ||
var spawnSync = require('child_process').spawnSync | ||
var a = require('assert') | ||
const TestRunner = require('test-runner') | ||
const jsdoc = require('../') | ||
const Fixture = require('./lib/fixture') | ||
const fs = require('fs') | ||
const spawnSync = require('child_process').spawnSync | ||
const a = require('assert') | ||
var runner = new TestRunner() | ||
const runner = new TestRunner() | ||
/* only test on a node version with spawnSync */ | ||
if (spawnSync) { | ||
runner.test('.renderSync({ files })', function () { | ||
Fixture.createTmpFolder('tmp') | ||
var f = new Fixture('class-all') | ||
jsdoc.renderSync({ files: f.sourcePath, destination: 'tmp/out' }) | ||
a.doesNotThrow(function () { | ||
fs.statSync('./tmp/out/index.html') | ||
}) | ||
runner.test('.renderSync({ files })', function () { | ||
Fixture.createTmpFolder('tmp') | ||
const f = new Fixture('class-all') | ||
jsdoc.renderSync({ files: f.sourcePath, destination: 'tmp/out' }) | ||
a.doesNotThrow(function () { | ||
fs.statSync('./tmp/out/index.html') | ||
}) | ||
}) | ||
runner.test('.renderSync({ source, destination })', function () { | ||
Fixture.createTmpFolder('tmp') | ||
var f = new Fixture('class-all') | ||
jsdoc.renderSync({ source: f.getSource(), destination: 'tmp/out' }) | ||
a.doesNotThrow(function () { | ||
fs.statSync('./tmp/out/index.html') | ||
}) | ||
runner.test('.renderSync({ source, destination })', function () { | ||
Fixture.createTmpFolder('tmp') | ||
const f = new Fixture('class-all') | ||
jsdoc.renderSync({ source: f.getSource(), destination: 'tmp/out' }) | ||
a.doesNotThrow(function () { | ||
fs.statSync('./tmp/out/index.html') | ||
}) | ||
} | ||
}) |
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
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
4
1075367
52
1714
235
+ Addedjsdoc@^3.5.3
+ Added@babel/helper-string-parser@7.24.8(transitive)
+ Added@babel/helper-validator-identifier@7.24.7(transitive)
+ Added@babel/parser@7.25.6(transitive)
+ Added@babel/types@7.25.6(transitive)
+ Added@types/linkify-it@5.0.0(transitive)
+ Added@types/markdown-it@12.2.3(transitive)
+ Added@types/mdurl@2.0.0(transitive)
+ Addedargparse@2.0.1(transitive)
+ Addedbluebird@3.7.2(transitive)
+ Addedcatharsis@0.9.0(transitive)
+ Addedentities@2.1.0(transitive)
+ Addedescape-string-regexp@2.0.0(transitive)
+ Addedjs2xmlparser@4.0.2(transitive)
+ Addedjsdoc@3.6.11(transitive)
+ Addedklaw@3.0.0(transitive)
+ Addedlinkify-it@3.0.3(transitive)
+ Addedmarkdown-it@12.3.2(transitive)
+ Addedmarkdown-it-anchor@8.6.7(transitive)
+ Addedmarked@4.3.0(transitive)
+ Addedmdurl@1.0.1(transitive)
+ Addedmkdirp@1.0.4(transitive)
+ Addedstrip-json-comments@3.1.1(transitive)
+ Addedto-fast-properties@2.0.0(transitive)
+ Addeduc.micro@1.0.6(transitive)
+ Addedunderscore@1.13.7(transitive)
+ Addedwalk-back@3.0.1(transitive)
+ Addedxmlcreate@2.0.4(transitive)
- Removedjsdoc-75lb@^3.6.0
- Removedacorn@3.3.0(transitive)
- Removedacorn-jsx@3.0.1(transitive)
- Removedbluebird@3.4.7(transitive)
- Removedcatharsis@0.8.11(transitive)
- Removedescape-string-regexp@1.0.5(transitive)
- Removedespree@3.1.7(transitive)
- Removedjs2xmlparser@1.0.0(transitive)
- Removedjsdoc-75lb@3.6.0(transitive)
- Removedklaw@1.3.1(transitive)
- Removedmarked@0.3.19(transitive)
- Removedminimist@1.2.8(transitive)
- Removedmkdirp@0.5.6(transitive)
- Removedstrip-json-comments@2.0.1(transitive)
- Removedunderscore@1.8.3(transitive)
- Removedwalk-back@2.0.1(transitive)
Updatedarray-back@^2.0.0
Updatedcache-point@^0.4.1
Updatedcollect-all@^1.0.3
Updatedobject-to-spawn-args@^1.1.1
Updatedwalk-back@^3.0.0