Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

documentary

Package Overview
Dependencies
Maintainers
1
Versions
118
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

documentary - npm Package Compare versions

Comparing version 1.34.3 to 1.34.4

build/lib/rules/_table.js

8

build/bin/doc.js
#!/usr/bin/env node
const { _source, _output, _toc, _watch, _push, _version, _extract, _h1, _reverse, _generate, _noCache, _namespace, _help, argsConfig, _wiki, _types, _focus } = require('./get-args');
const { _source, _output, _toc, _watch, _push, _version, _extract, _h1,
_reverse, _generate, _noCache, _namespace, _help, argsConfig, _wiki,
_types, _focus, _debug } = require('./get-args');
const { watch } = require('fs');

@@ -14,2 +16,6 @@ const { debuglog } = require('util');

if (_debug) {
process.env.NODE_DEBUG = [process.env.NODE_DEBUG, 'doc']
.filter(Boolean).join(',')
}
const LOG = debuglog('doc')

@@ -16,0 +22,0 @@ const DEBUG = /doc/.test(process.env['NODE_DEBUG'])

@@ -58,2 +58,7 @@ const { argufy } = require('../../stdlib');

},
'debug': {
description: 'Print verbose debug information.\nSame as setting `NODE_DEBUG=doc`.',
boolean: true,
short: 'd',
},
'generate': {

@@ -80,2 +85,3 @@ description: '[Deprecated] Places typedefs definitions into JavaScript\nfiles from types.xml. Use `typal` instead.',

}
const args = argufy(argsConfig)

@@ -150,2 +156,8 @@

/**
* Print verbose debug information.
Same as setting `NODE_DEBUG=doc`.
*/
const _debug = /** @type {boolean} */ (args['debug'])
/**
* [Deprecated] Places typedefs definitions into JavaScript

@@ -190,2 +202,3 @@ files from types.xml. Use `typal` instead.

module.exports._push = _push
module.exports._debug = _debug
module.exports._generate = _generate

@@ -192,0 +205,0 @@ module.exports._extract = _extract

12

build/components/Typedef/index.js

@@ -61,3 +61,2 @@ const { h } = require('preact');

const res = type.toMarkdown(allTypes, opts)
res.examples = type.examples
return res

@@ -77,8 +76,8 @@ }

const ttt = tt.map((s, i) => {
const { LINE, table: type, displayInDetails, examples } = s
const { LINE, table: type, displayInDetails } = s
const isObject = typeof type == 'object' // table can be empty string, e.g., ''
const ch = isObject ? h(Narrow,{...type,key:i,
const ch = isObject ? h(Narrow,{...type,key:i,
documentary:documentary, allTypes:allTypes, opts:opts,
slimFunctions:slimFunctions, examples:examples
slimFunctions:slimFunctions
}) : type

@@ -119,3 +118,3 @@ if (displayInDetails) {

const Narrow = ({ props, anyHaveDefault, documentary, constr, allTypes, opts,
slimFunctions, examples }) => {
slimFunctions }) => {
const md = (name, afterCutLinks) => {

@@ -132,7 +131,6 @@ return md2html({ documentary, children: [name], afterCutLinks })

props.reduce((acc, { name, typeName, de, d, prop }) => {
if (name == 'constructor') prop.examples = examples
let desc = (prop.args && !slimFunctions) ? makeMethodTable(prop, allTypes, opts, {
indent: '', join: '<br/>\n', preargs: '<br/>\n',
}) : de
if (examples.length) {
if (prop.examples.length) {
desc += `\n${makeExamples(prop.examples)}`

@@ -139,0 +137,0 @@ }

## 16 December 2019
### [1.34.4](https://github.com/artdecocode/documentary/compare/v1.34.3...v1.34.4)
- [deps] Update `typal` to fix examples.
- [feature] Pass `-d` flag for debug.
### [1.34.3](https://github.com/artdecocode/documentary/compare/v1.34.2...v1.34.3)

@@ -4,0 +9,0 @@

{
"name": "documentary",
"version": "1.34.3",
"version": "1.34.4",
"description": "Documentation Compiler To Generate The Table Of Contents, Embed Examples With Their Output, Make Markdown Tables, Maintain Typedefs For JavaScript And README, Watch Changes To Push, Use Macros And Prettify API Titles.",

@@ -14,3 +14,3 @@ "main": "build",

"e": "node example",
"dev": "NODE_DEBUG=doc node src/bin",
"dev": "node src/bin -d",
"d1": "typal src",

@@ -23,8 +23,5 @@ "d": "yarn-s d1",

"old-typal": "doc doc/10-typedef -o doc/typal.md",
"b": "ALAMODE_ENV=build yarn-s src jsx b2",
"competent": "alanode build-competent",
"stdlib": "depack src/stdlib -o stdlib/index.js -a -c -p -s --source_map_include_content",
"src": "alamode src -o build -i bin/index.js,stdlib.js -s",
"jsx": "alamode build/components -o build/components -s -j -p",
"b2": "alamode build/components -o build/components -s",
"b": "ALAMODE_ENV=build alamode src -o build -i bin/index.js,stdlib.js -s -j -p -m",
"build": "yarn-s b doc",

@@ -126,4 +123,4 @@ "up": "yarn-up -e preact",

"preact": "8.5.3",
"typal": "^1.24.0"
"typal": "^1.24.1"
}
}

@@ -277,2 +277,8 @@ Documentary

<tr>
<td>--debug</td>
<td>-d</td>
<td>Print verbose debug information.
Same as setting <code>NODE_DEBUG=doc</code>.</td>
</tr>
<tr>
<td>--generate</td>

@@ -279,0 +285,0 @@ <td>-g</td>

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc