UNPKG

report-todo

Version:

Parse and report TODO, FIXME, BUG etc. comments in source code.

12 lines 2.39 kB
#!/usr/bin/env node !function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t():"function"==typeof define&&define.amd?define([],t):"object"==typeof exports?exports["report-todo"]=t():e["report-todo"]=t()}(global,(function(){return function(e){var t={};function o(r){if(t[r])return t[r].exports;var n=t[r]={i:r,l:!1,exports:{}};return e[r].call(n.exports,n,n.exports,o),n.l=!0,n.exports}return o.m=e,o.c=t,o.d=function(e,t,r){o.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:r})},o.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},o.t=function(e,t){if(1&t&&(e=o(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var r=Object.create(null);if(o.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var n in e)o.d(r,n,function(t){return e[t]}.bind(null,n));return r},o.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return o.d(t,"a",t),t},o.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},o.p="",o(o.s=101)}({101:function(e,t,o){const{DEFAULT_OPTIONS:r,reportTodo:n,oneLine:s,commander:u}=o(102),i=["CVS/",".git/",".hg/","node_modules/",".svn/","*.log","*.swp"];u.description(s`Generate a report of TODO etc. comments parsed under trees of files rooted at each GLOB.`+"\n\n"+s`Multiple GLOB patterns are supported; patterns are parsed with globby, which for example also supports negative matches, see https://github.com/sindresorhus/globby for more information; if GLOBs are not specified, the current directory is used as the only root; some patterns are also excluded by default, see also the --no-default-excludes option.`).arguments("[GLOBs...]");for(const e of r)e.cliFlags&&e.cliDesc&&u.option(e.cliFlags,e.cliDesc(e),e.cliProcess);u.option("--no-default-excludes",s`do not exclude some patterns by default, i.e. only strictly use the GLOBs explicitly passed on the command line; the patterns excluded by default are [ ${i.join(" ")} ]`),u.action((e,t)=>async function(e,t){e.length||e.push(".");t.defaultExcludes&&e.push(...i.map(e=>`!${e}`));console.log(await n(e,{...t}))}(e,t)).parse(process.argv)},102:function(e,t){e.exports=require("report-todo")}})}));