HackerOne users: Testing against this community violates our program's Terms of Service and will result in your bounty being denied.

How do I generate nbbc.php?

I want to generate the condensed version of nbbc.php using Vanilla's fork of NBBC, however I can't find any information on what to do to generate it.

Is this even an option?


  • Not understanding the the question. You want to update the file or you want to reduce the amount of tags.

    If you are forking the pluign then you can do what you like. It is up to you to add any dependencies you like.

    grep is your friend.

  • LincLinc Detroit Admin

    I didn't even know that was a thing you could do. We simply use it as a Composer dependency.

  • adericaderic New
    edited April 2018

    The original NBBC had a merge.pl in the tools directory which essentially took all of the individual PHP files and merged them into a single, condensed file with stripped away comments and no debugging.

    You can see how merge.pl works: https://github.com/theyak/nbbc

    In the vanilla fork of NBBC, there are a few references to the condensed version being generated (which I assume are old comments carried over from the original NBBC): https://github.com/vanilla/nbbc but there is no merge.pl to speak of.

    I ended up just merging the files by hand and removing all references to the debugger class (a few debug calls were being made regardless if debugging was disabled). Vanilla NBBC is much faster than the original NBBC and taking debugging out made some of the tests execute in half the time.

  • x00x00 MVP
    edited April 2018

    it wouldn't be that difficult put to modify merge.pl so it merges that files. especially it is just a difference in file names.

    You could do a merge.php even, then submit as a PR

    grep is your friend.

  • I made an attempt at modifying merge.pl (I don't know PERL). I got it mostly working but then found out that it erroneously strips double slashes (what it thinks to be comments) in strings. I think the regular expressions it uses will need to be tweaked as the fork's files contain strings with double slashes in them, e.g.: strings with "http://" for example.

Sign In or Register to comment.