markdown-magic 4.5.3 → 4.5.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +5 -5
- package/src/index.js +7 -2
- package/types/src/cli-run.d.ts.map +1 -1
- package/types/src/index.d.ts.map +1 -1
- package/types/src/transforms/code/index.d.ts.map +1 -1
- package/types/src/transforms/file.d.ts.map +1 -1
- package/types/src/utils/fs.d.ts +6 -0
- package/types/src/utils/fs.d.ts.map +1 -1
- package/types/src/utils/remoteRequest.d.ts +0 -1
- package/types/src/utils/remoteRequest.d.ts.map +1 -1
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "markdown-magic",
|
|
3
|
-
"version": "4.5.
|
|
3
|
+
"version": "4.5.6",
|
|
4
4
|
"description": "Automatically update markdown files with content from external sources",
|
|
5
5
|
"main": "src/index.js",
|
|
6
6
|
"bin": {
|
|
@@ -42,9 +42,9 @@
|
|
|
42
42
|
"dependencies": {
|
|
43
43
|
"@davidwells/md-utils": "0.0.53",
|
|
44
44
|
"color-convert": "^2.0.1",
|
|
45
|
-
"comment-block-parser": "1.5.
|
|
46
|
-
"comment-block-replacer": "0.1.
|
|
47
|
-
"comment-block-transformer": "0.5.
|
|
45
|
+
"comment-block-parser": "1.5.4",
|
|
46
|
+
"comment-block-replacer": "0.1.13",
|
|
47
|
+
"comment-block-transformer": "0.5.5",
|
|
48
48
|
"globrex": "^0.1.2",
|
|
49
49
|
"gray-matter": "^4.0.3",
|
|
50
50
|
"is-glob": "^4.0.3",
|
|
@@ -70,5 +70,5 @@
|
|
|
70
70
|
"publishConfig": {
|
|
71
71
|
"access": "public"
|
|
72
72
|
},
|
|
73
|
-
"gitHead": "
|
|
73
|
+
"gitHead": "afb6fd2c43370c3e0e7e545739c9aa8540960096"
|
|
74
74
|
}
|
package/src/index.js
CHANGED
|
@@ -176,13 +176,18 @@ async function markdownMagic(globOrOpts = {}, options = {}) {
|
|
|
176
176
|
open = `${opts.matchWord}:start`
|
|
177
177
|
}
|
|
178
178
|
|
|
179
|
-
|
|
180
|
-
|
|
179
|
+
// When open is custom and close not specified, leave close undefined
|
|
180
|
+
// to enable pattern mode in block-parser (auto-generates close as /OpenTag)
|
|
181
|
+
let close
|
|
182
|
+
if (opts.close !== undefined) {
|
|
181
183
|
close = opts.close
|
|
182
184
|
// @ts-ignore legacy
|
|
183
185
|
} else if (opts.matchWord) {
|
|
184
186
|
// @ts-ignore legacy
|
|
185
187
|
close = `${opts.matchWord}:end`
|
|
188
|
+
} else if (!opts.open || opts.open === OPEN_WORD) {
|
|
189
|
+
// Only default to /docs when using default open word
|
|
190
|
+
close = CLOSE_WORD
|
|
186
191
|
}
|
|
187
192
|
|
|
188
193
|
const cwd = opts.cwd || process.cwd()
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"cli-run.d.ts","sourceRoot":"","sources":["../../src/cli-run.js"],"names":[],"mappings":";
|
|
1
|
+
{"version":3,"file":"cli-run.d.ts","sourceRoot":"","sources":["../../src/cli-run.js"],"names":[],"mappings":";AA0GA,6FA4QC"}
|
package/types/src/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.js"],"names":[],"mappings":";;;yBAkDa,IAAI,GAAG,IAAI,GAAG,KAAK,GAAG,MAAM;;;;+BAK5B,MAAM,GAAC,KAAK,CAAC,MAAM,CAAC;iCAIpB,OAAO,wBAAwB,EAAE,kBAAkB;;;;;;;;;;YASlD,gBAAgB;;;;;;;;aAEhB,YAAY,GAAC,MAAM;;;;aACnB,UAAU;;;;WACV,MAAM;;;;YACN,MAAM;;;;UACN,MAAM;;;;oBACN,OAAO;;;;iBACP,OAAO;;;;UACP,OAAO;;;;YACP,OAAO;;;;aACP,OAAO;;;;8BACP,OAAO;;;;8BACP,OAAO;;;;0BACP,OAAO;;;;gBACP,MAAM;;;;;;;;;gBAMN,MAAM;;;;qBACN,OAAO;;;;;;;;8BAEP,OAAO;;;;;;;;;;;;;kBAQP,KAAK,CAAC,MAAM,CAAC;;;;;;AApD3B;;;GAGG;AAEH;;;GAGG;AAEH;;GAEG;AAEH;;;;;;;;;;;;;;;;;;;;;;GAsBG;AAEH;;;;;;;GAOG;AAEH;;;;;;;GAOG;AAEH;;;;;;;;;;;;;;;;GAgBG;AACH,2CARW,gBAAgB,GAAC,oBAAoB,YACrC,oBAAoB,GAClB,OAAO,CAAC,mBAAmB,CAAC,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.js"],"names":[],"mappings":";;;yBAkDa,IAAI,GAAG,IAAI,GAAG,KAAK,GAAG,MAAM;;;;+BAK5B,MAAM,GAAC,KAAK,CAAC,MAAM,CAAC;iCAIpB,OAAO,wBAAwB,EAAE,kBAAkB;;;;;;;;;;YASlD,gBAAgB;;;;;;;;aAEhB,YAAY,GAAC,MAAM;;;;aACnB,UAAU;;;;WACV,MAAM;;;;YACN,MAAM;;;;UACN,MAAM;;;;oBACN,OAAO;;;;iBACP,OAAO;;;;UACP,OAAO;;;;YACP,OAAO;;;;aACP,OAAO;;;;8BACP,OAAO;;;;8BACP,OAAO;;;;0BACP,OAAO;;;;gBACP,MAAM;;;;;;;;;gBAMN,MAAM;;;;qBACN,OAAO;;;;;;;;8BAEP,OAAO;;;;;;;;;;;;;kBAQP,KAAK,CAAC,MAAM,CAAC;;;;;;AApD3B;;;GAGG;AAEH;;;GAGG;AAEH;;GAEG;AAEH;;;;;;;;;;;;;;;;;;;;;;GAsBG;AAEH;;;;;;;GAOG;AAEH;;;;;;;GAOG;AAEH;;;;;;;;;;;;;;;;GAgBG;AACH,2CARW,gBAAgB,GAAC,oBAAoB,YACrC,oBAAoB,GAClB,OAAO,CAAC,mBAAmB,CAAC,CAqmBxC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/transforms/code/index.js"],"names":[],"mappings":";;;AA+CiB,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/transforms/code/index.js"],"names":[],"mappings":";;;AA+CiB,kDA+JhB;;;;;;;;;SAzLa,MAAM;;;;aACN,MAAM;;;;aACN,MAAM;;;;YACN,MAAM;;;;cACN,MAAM;;;;mBACN,OAAO"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"file.d.ts","sourceRoot":"","sources":["../../../src/transforms/file.js"],"names":[],"mappings":"AAKiB,
|
|
1
|
+
{"version":3,"file":"file.d.ts","sourceRoot":"","sources":["../../../src/transforms/file.js"],"names":[],"mappings":"AAKiB,yCAsDhB"}
|
package/types/src/utils/fs.d.ts
CHANGED
|
@@ -13,6 +13,12 @@ export function isLocalPath(filePath: string): boolean;
|
|
|
13
13
|
export function writeFile(filePath: string, content: string): Promise<void>;
|
|
14
14
|
export const readFile: typeof fs.readFile;
|
|
15
15
|
export function findUp(start: any, fileName: any): Promise<string>;
|
|
16
|
+
/**
|
|
17
|
+
* Check if file's directory or any parent has .md-ignore
|
|
18
|
+
* @param {string} filePath - Absolute path to file
|
|
19
|
+
* @returns {boolean} True if should be ignored
|
|
20
|
+
*/
|
|
21
|
+
export function hasIgnoreFile(filePath: string): boolean;
|
|
16
22
|
export function resolveOutputPath(cwd: any, outputDir: any, file: any): string;
|
|
17
23
|
export function resolveFlatPath(cwd: any, outputDir: any, file: any): string;
|
|
18
24
|
export function resolveCommonParent(mainDir?: string, fileDir?: string): string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"fs.d.ts","sourceRoot":"","sources":["../../../src/utils/fs.js"],"names":[],"mappings":"AAwLA;;;;GAIG;AACH,sCAHW,MAAM,GACJ,OAAO,CAKnB;AA5KD;;;;;GAKG;AACH,oCAJW,MAAM,WACN,MAAM,GACJ,OAAO,CAAC,IAAI,CAAC,CAUzB;;AAED,mEAeC;
|
|
1
|
+
{"version":3,"file":"fs.d.ts","sourceRoot":"","sources":["../../../src/utils/fs.js"],"names":[],"mappings":"AAwLA;;;;GAIG;AACH,sCAHW,MAAM,GACJ,OAAO,CAKnB;AA5KD;;;;;GAKG;AACH,oCAJW,MAAM,WACN,MAAM,GACJ,OAAO,CAAC,IAAI,CAAC,CAUzB;;AAED,mEAeC;AAiJD;;;;GAIG;AACH,wCAHW,MAAM,GACJ,OAAO,CAenB;AA7DD,+EAeC;AAED,6EAQC;AAvCD,gFAYC;AA3DD,2EAUC;AApBD;;;;;GAKG;AACH,4CAJW,MAAM,OACN,MAAM,GACJ,MAAM,CAIlB;;iBA1FwB,QAAQ"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"remoteRequest.d.ts","sourceRoot":"","sources":["../../../src/utils/remoteRequest.js"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"remoteRequest.d.ts","sourceRoot":"","sources":["../../../src/utils/remoteRequest.js"],"names":[],"mappings":"AAMA,kFAmBC"}
|