documentary
Advanced tools
Comparing version 1.35.13 to 1.36.0
@@ -66,4 +66,5 @@ const { Replaceable, makeMarkers, makeCutRule, makePasteRule } = require('../../stdlib'); | ||
const { DOCUMENTARY_CWD: CWD = '.' } = process.env | ||
let { DOCUMENTARY_IGNORE_HIDDEN: IGNORE_HIDDEN = true } = process.env | ||
let { DOCUMENTARY_IGNORE_HIDDEN: IGNORE_HIDDEN = true, ONLY_DOC = true } = process.env | ||
if (IGNORE_HIDDEN) IGNORE_HIDDEN = IGNORE_HIDDEN != 'false' | ||
if (ONLY_DOC) ONLY_DOC = ONLY_DOC != 'false' | ||
@@ -427,3 +428,6 @@ /** | ||
if (basename(chunk.file) == '.DS_Store') return next() | ||
if (/\.(jsx?|xml|png|jpe?g|gif|svg)$/i.test(chunk.file)) return next() | ||
if (chunk.file != 'separator' && ONLY_DOC && !/\.(markdown|md|html?)$/i.test(chunk.file)) { | ||
console.log('ignore', chunk.file) | ||
return next() | ||
} | ||
if (IGNORE_HIDDEN && basename(chunk.file).startsWith('.')) return next() | ||
@@ -430,0 +434,0 @@ chunk.file != 'separator' && LOG(b(chunk.file, 'cyan')) |
@@ -1,2 +0,2 @@ | ||
const { parse } = require('path'); | ||
const { parse, join, dirname } = require('path'); | ||
const { resolveDependency } = require('../../../stdlib'); | ||
@@ -30,2 +30,3 @@ const { read, codeSurround } = require('../'); | ||
try { | ||
if (source.startsWith('./')) source = join(dirname(this.currentFile), source) | ||
const { path } = await resolveDependency(source) | ||
@@ -32,0 +33,0 @@ let f = await read(path) |
@@ -0,1 +1,8 @@ | ||
## 10 February 2020 | ||
### [1.36.0](https://github.com/artdecocode/documentary/compare/v1.35.13...v1.36.0) | ||
- [feature] Relative examples. | ||
- [feature] Read only markdown/html files. | ||
## 5 February 2020 | ||
@@ -2,0 +9,0 @@ |
{ | ||
"name": "documentary", | ||
"version": "1.35.13", | ||
"version": "1.36.0", | ||
"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.", | ||
@@ -11,3 +11,3 @@ "main": "build", | ||
"test": "yarn t test/spec test/mask", | ||
"test-build": "ALAMODE_ENV=test-build yarn test", | ||
"test-build": "yarn test -e test-build", | ||
"lint": "eslint .", | ||
@@ -121,3 +121,3 @@ "e": "node example", | ||
"dependencies": { | ||
"alamode": "^3.4.1", | ||
"alamode": "^3.5.0", | ||
"preact": "8.5.3", | ||
@@ -124,0 +124,0 @@ "typal": "^1.26.2" |
@@ -80,2 +80,3 @@ Documentary | ||
* [`NODE_DEBUG=doc`](#node_debugdoc) | ||
* [Markdown Files](#markdown-files) | ||
* [Hidden Files](#hidden-files) | ||
@@ -313,3 +314,3 @@ - [♫ PRO<br/>♪ Underlined<br/>♯ `Titles`](#-pro-underlined-titles) | ||
When <a name="node_debugdoc">`NODE_DEBUG=doc`</a> is set, the program will print processing information, e.g., | ||
When <a name="node_debugdoc">`NODE_DEBUG=doc`</a> is set (or `-d` flag is passed), the program will print processing information, e.g., | ||
@@ -323,2 +324,6 @@ ``` | ||
### Markdown Files | ||
Only the following extensions are processed: `markdown`, `md`, `html`, `htm`. Anything else is ignored. This is to allow to place examples in the documentary folder. To process all files, set the `ONLY_DOC=false` variable. | ||
### Hidden Files | ||
@@ -325,0 +330,0 @@ |
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
Native code
Supply chain riskContains native code (e.g., compiled binaries or shared libraries). Including native code can obscure malicious behavior.
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
478664
83
5266
381
3
Updatedalamode@^3.5.0