lib/parser.js
function pr_parse(options) {
    this.traverse(options, function (dir, item, out) {
      fs.readFile(dir + item, function(err, data) {
        console.log('adding log ' + dir + item);

        if (err) {
          console.log(err);
          console.log(data);
          return;
        }

        var source = data.toString();
        var output;

        // if no match in the file
        if (!source.match(regex)) {
          return;
        }

        output = source.replace(regex, replacer);

        fs.writeFile(out + item, output, function(err) {
          if (err) {
            console.log(err);
          } else {
            console.log(out + item + ' was saved!');
          }
        });
      });
    });
  }
function pr_parse(options) {
    this.traverse(options, function (dir, item, out) {
      fs.readFile(dir + item, function(err, data) {
        console.log('adding log ' + dir + item);

        if (err) {
          console.log(err);
          console.log(data);
          return;
        }

        var source = data.toString();
        var output;

        // if no match in the file
        if (!source.match(regex)) {
          return;
        }

        output = source.replace(regex, replacer);

        fs.writeFile(out + item, output, function(err) {
          if (err) {
            console.log(err);
          } else {
            console.log(out + item + ' was saved!');
          }
        });
      });
    });
  }
function pr_parse ( options ) { this . traverse ( options , function ( dir , item , out ) { fs . readFile ( dir + item , function ( err , data ) { console . log ( 'adding log ' + dir + item ) ; if ( err ) { console . log ( err ) ; console . log ( data ) ; return ; } var source = data . toString ( ) ; var output ; // if no match in the file if ( ! source . match ( regex ) ) { return ; } output = source . replace ( regex , replacer ) ; fs . writeFile ( out + item , output , function ( err ) { if ( err ) { console . log ( err ) ; } else { console . log ( out + item + ' was saved!' ) ; } } ) ; } ) ; } ) ; }
Replace debuguy comments to predifined condole logs.
@param  {[type]} options [description]
@return {[type]}         [description]
Replace debuguy comments to predifined condole logs .