Closed mondeja closed 4 years ago
It seems that the pull to comment-patterns
have been merged to the master. So, when a new version of multilang-extract-comments
have been released with .mjs
file detection support, I will change the version in package.json
and remove the .mjs
exception in src/parsers/multilang.mjs
.
He actualizado la versión de multilang-extract-comments
para soportar archivos .mjs
.
src/parsers/multilang.mjs
I've included a exception when ' .mjs' files are found bycomment-patterns
library. Also opened a pull incomment-patterns
including.mjs
modules support, but the last change in the project was 2 years ago, so we need to found another way of extract comments or include this type of exceptions to prevent next error happening when I runnpm install
:/home/mondeja/files/code/Leafdoc/node_modules/comment-patterns/index.js:18 throw new Error("Cannot find language definition for '" + filename + "'") ^
Error: Cannot find language definition for 'src/cli.mjs' at langIndex (/home/mondeja/files/code/Leafdoc/node_modules/comment-patterns/index.js:18:11) at Function.commentRegex [as regex] (/home/mondeja/files/code/Leafdoc/node_modules/comment-patterns/index.js:50:28) at extract (/home/mondeja/files/code/Leafdoc/node_modules/multilang-extract-comments/index.js:31:17) at multilangParser (file:///home/mondeja/files/code/Leafdoc/src/parsers/multilang.mjs:8:20) at Leafdoc.addStr (file:///home/mondeja/files/code/Leafdoc/src/leafdoc.mjs:228:24) at Leafdoc.addBuffer (file:///home/mondeja/files/code/Leafdoc/src/leafdoc.mjs:193:15) at Leafdoc.addFile (file:///home/mondeja/files/code/Leafdoc/src/leafdoc.mjs:185:15) at file:///home/mondeja/files/code/Leafdoc/src/cli.mjs:57:8 at Array.forEach ()
at file:///home/mondeja/files/code/Leafdoc/src/cli.mjs:52:8
file:///home/mondeja/files/code/Leafdoc/src/template.mjs:10 let templateDir =
${__dirname }/../templates/basic
;ReferenceError: __dirname is not defined
file:///home/mondeja/files/code/Leafdoc/src/regexps.mjs:34 leafDirective = xRegExp(
\\s* ${ char } (?<directive> \\S+ ) (\\s+ (?<content> [^;\\n]+ )){0,1}
, 'gnx'); ^ReferenceError: Cannot access 'leafDirective' before initialization