documentary
Advanced tools
Comparing version 1.6.0 to 1.6.1
@@ -10,11 +10,30 @@ "use strict"; | ||
var _wrote = require("wrote"); | ||
var _path = require("path"); | ||
var _fs = require("fs"); | ||
var _catchment = _interopRequireDefault(require("catchment")); | ||
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } | ||
const LOG = (0, _util.debuglog)('doc'); | ||
const read = async source => { | ||
const rs = (0, _fs.createReadStream)(source); | ||
const data = await new Promise(async (r, j) => { | ||
const { | ||
promise | ||
} = new _catchment.default({ | ||
rs | ||
}); | ||
rs.on('error', j); | ||
const res = await promise; | ||
r(res); | ||
}); | ||
return data; | ||
}; | ||
const replacer = async (match, source, from, to, type) => { | ||
try { | ||
let f = await (0, _wrote.read)(source); | ||
let f = await read(source); | ||
f = f.trim(); | ||
@@ -21,0 +40,0 @@ |
## 22 June 2018 | ||
### 1.6.1 | ||
- [dep] Remove `wrote`, implement simple file read. | ||
- [fix] `skipLevelOne=true` in documentation. | ||
### 1.6.0 | ||
@@ -4,0 +9,0 @@ |
{ | ||
"name": "documentary", | ||
"version": "1.6.0", | ||
"version": "1.6.1", | ||
"description": "A library to manage documentation, such as README, usage, man pages and changelog.", | ||
@@ -60,5 +60,4 @@ "main": "build", | ||
"restream": "2.1.0", | ||
"spawncommand": "2.0.1", | ||
"wrote": "1.4.0" | ||
"spawncommand": "2.0.1" | ||
} | ||
} |
@@ -35,3 +35,3 @@ # documentary | ||
* [`Toc` Type](#toc-type) | ||
* [`constructor(config?: object): Toc`](#constructorconfig-skiplevelone-boolean--false-toc) | ||
* [`constructor(config?: object): Toc`](#constructorconfig-skiplevelone-boolean--true-toc) | ||
@@ -272,3 +272,3 @@ ## Installation & Usage | ||
### `constructor(`<br/> `config?: {`<br/> `skipLevelOne?: boolean = false,`<br/> `},`<br/>`): Toc` | ||
### `constructor(`<br/> `config?: {`<br/> `skipLevelOne?: boolean = true,`<br/> `},`<br/>`): Toc` | ||
@@ -275,0 +275,0 @@ Create a new instance of a `Toc` stream. |
Sorry, the diff of this file is not supported yet
74607
5
709
4
- Removedwrote@1.4.0
- Removederotic@0.2.0(transitive)
- Removedmakepromise@1.1.1(transitive)
- Removedrestream@1.2.0(transitive)
- Removedwrote@1.4.0(transitive)