lua-doc-extractor
Advanced tools
| { | ||
| "name": "lua-doc-extractor", | ||
| "version": "3.3.0", | ||
| "version": "3.3.1", | ||
| "description": "Extracts lua documentation from C-style comments", | ||
@@ -20,2 +20,3 @@ "main": "dist/src/index.js", | ||
| "scripts": { | ||
| "cli": "tsx src/cli.ts", | ||
| "start": "tsx src/index.ts", | ||
@@ -22,0 +23,0 @@ "prepare": "npm run build", |
+11
-2
@@ -26,3 +26,12 @@ #!/usr/bin/env node | ||
| typeLabel: "{underline file} ...", | ||
| description: "Files to extract lua doc from. Supports globs.\n", | ||
| description: (0, dedent_js_1.default) ` | ||
| Files to extract lua doc from. Supports globs. | ||
| Note that if globs are used, you may need to wrap them in quotes to prevent shell expansion. | ||
| For example: | ||
| lua-doc-extractor "**/*.cpp" | ||
| lua-doc-extractor --src "lib/**/*.\\{c,h\\}" | ||
| `, | ||
| }, | ||
@@ -77,3 +86,3 @@ { | ||
| "$ lua-doc-extractor file_a.cpp file_b.cpp", | ||
| "$ lua-doc-extractor ---src src/**/*.{cpp,h} --dest output/lib.lua", | ||
| '$ lua-doc-extractor ---src "src/**/*.\\{cpp,h\\}" --dest output/lib.lua', | ||
| "$ lua-doc-extractor *.cpp --repo https://github.com/user/proj/blob/12345c/", | ||
@@ -80,0 +89,0 @@ ]; |
@@ -42,7 +42,2 @@ "use strict"; | ||
| result.push({ | ||
| // NOTE: Trimming trailing whitespace here because it makes the | ||
| // grammer easier to write. Ideally the gammar would be whitespace | ||
| // insensitive. | ||
| // | ||
| // See https://github.com/rhys-vdw/lua-doc-extractor/issues/60 | ||
| text: (0, utility_1.trimTrailingWhitespace)(dedented.trimStart()), | ||
@@ -49,0 +44,0 @@ start: current.start, |
@@ -65,5 +65,5 @@ "use strict"; | ||
| { "name": "description", "symbols": ["__", "lines"], "postprocess": ([, d]) => d }, | ||
| { "name": "description", "symbols": [(docLexer_1.docLexer.has("newline") ? { type: "newline" } : newline), "lines"], "postprocess": ([, d]) => d }, | ||
| { "name": "description", "symbols": ["eol", "lines"], "postprocess": ([, d]) => d }, | ||
| { "name": "unionDesc", "symbols": ["__", "anyWordButPipe", "lines"], "postprocess": ([, word, ls]) => [word, ls].join('') }, | ||
| { "name": "unionDesc", "symbols": [(docLexer_1.docLexer.has("newline") ? { type: "newline" } : newline), "lines"], "postprocess": ([, ls]) => ls }, | ||
| { "name": "unionDesc", "symbols": ["eol", "lines"], "postprocess": ([, ls]) => ls }, | ||
| { "name": "lines$ebnf$1", "symbols": [] }, | ||
@@ -74,3 +74,3 @@ { "name": "lines$ebnf$1", "symbols": ["lines$ebnf$1", "line"], "postprocess": (d) => d[0].concat([d[1]]) }, | ||
| { "name": "line$ebnf$1", "symbols": ["line$ebnf$1", "anyWord"], "postprocess": (d) => d[0].concat([d[1]]) }, | ||
| { "name": "line", "symbols": ["line$ebnf$1", (docLexer_1.docLexer.has("newline") ? { type: "newline" } : newline)], "postprocess": ([l, nl]) => [...l.flat(), nl].join("") }, | ||
| { "name": "line", "symbols": ["line$ebnf$1", "eol"], "postprocess": ([l, nl]) => [...l.flat(), nl].join("") }, | ||
| { "name": "anyWordButPipe$subexpression$1", "symbols": [(docLexer_1.docLexer.has("word") ? { type: "word" } : word)] }, | ||
@@ -131,3 +131,4 @@ { "name": "anyWordButPipe$subexpression$1", "symbols": ["__"] }, | ||
| { "name": "_", "symbols": ["_$ebnf$1"], "postprocess": ([d]) => d?.value }, | ||
| { "name": "__", "symbols": [(docLexer_1.docLexer.has("space") ? { type: "space" } : space)], "postprocess": ([d]) => d.value } | ||
| { "name": "__", "symbols": [(docLexer_1.docLexer.has("space") ? { type: "space" } : space)], "postprocess": ([d]) => d.value }, | ||
| { "name": "eol", "symbols": ["_", (docLexer_1.docLexer.has("newline") ? { type: "newline" } : newline)], "postprocess": ([d]) => '\n' } | ||
| ], | ||
@@ -134,0 +135,0 @@ ParserStart: "doc", |
+2
-1
| { | ||
| "name": "lua-doc-extractor", | ||
| "version": "3.3.0", | ||
| "version": "3.3.1", | ||
| "description": "Extracts lua documentation from C-style comments", | ||
@@ -20,2 +20,3 @@ "main": "dist/src/index.js", | ||
| "scripts": { | ||
| "cli": "tsx src/cli.ts", | ||
| "start": "tsx src/index.ts", | ||
@@ -22,0 +23,0 @@ "prepare": "npm run build", |
URL strings
Supply chain riskPackage contains fragments of external URLs or IP addresses, which the package may be accessing at runtime.
Found 1 instance in 1 package
URL strings
Supply chain riskPackage contains fragments of external URLs or IP addresses, which the package may be accessing at runtime.
Found 1 instance in 1 package
1588
0.13%70317
-0.07%