npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

bob-compiler

v1.6.15

Published

Command line application to compile annotated code files in comments

Downloads

69

Readme

bob-compiler

NPM version NPM monthly downloads NPM total downloads Linux Build Status

Command line application to compile annotated code files in comments.

Install globaly

Install with npm:

$ npm install -g bob-compiler

Usage

$ bobc compile <file|dir­> <comments> [--groupby] [--pattern] [--parts] [--single] [--preset] [--results] [--print]

Compiles file or files in dir, replacing tags in every files with text in comments.

Examples

Here is an example of comments file content Iit may be in that format or in JSON format):

Total:60
1   Err:(4)The URL has the wrong value
1   Err:(9) Pseudo-element has wrong background-color
1   Err:(10) All text must be justified
0.5 Err:(11) File is badly named
1   Err:(19) Missing information

And a file annotated with tags

<!-- Err:(11) -->
<!DOCTYPE html>
<html lang="fr">

<head>
    <!-- Err:(19) -->
    <meta charset="UTF-8" />
    <meta name="author" content="" />

    <style>
        html {
            border-left: solid;
            margin-left: 50px;
            border-width: 10px;
            /* Err:(25) */
            padding: 10px;
            text-align: justify;
        }
    </style>
</head>

<body>
    <!-- Err:(22) -->
    <p class="pizzabacon">
        Chop. pork enim et occaecat shankle eiusmod landjaeger nisi
        <i>cillum</i> Id tail. magna cow non consectetur sunt jerky, qui chop Pork
        consectetur. ad lorem chicken <i>beef</i> corned quis.
    </p>
</body>

</html>

So, in a HTML file for instance, add comments containing the error tags <!-- Err: (n) --> where errors are encountered.

bobc will replace all comments with in comments file and sum-up all the points lost in the file adding a comment

Commands

compile

compile <file|dir­> <comments> [--groupby] [--pattern] [--parts] [--single] [--preset] [--results]

Compile file or files in dir using comments as replacement text for tags in file(s).

pattern

optional. Regular expression for filtering files in dir.

parts

optional. Parts of file to use in pattern.

  • resolve (alias fullname), default
  • extname
  • basename

groupby

optional. Parameter indicating that a named group in pattern is to be used to group files from dir into a single summation unit.

presets

Example
--pattern "(?<usercode>\w{4}\d{4|6}).*\.(html|cs))" --groupby usercode

results

optional. Print results summed for every group defined by groupby

  • csv
  • json

preset

optional. Use a preset for optional paramters defined with presets command.

print

optional. Export all compiled files to pdf.

presets <action> [name] [--groupby] [--pattern] [--parts] [--single] [--preset] [--results]

Define presets to use later in compile command. Actions may be:

  • add
  • remove
  • list
  • clear
  • share