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

b-l-a-h

v0.1.0

Published

Basic Language Automation Helper

Downloads

5

Readme

#B-L-A-H enter image description here

Basic Language Automation Helper.

var blah = require('b-l-a-h');
console.log(blah('Hello World'));

Installation

$ npm install b-l-a-h

Features

  • Dynamic Package Management
  • High Performance Basic Language Automation
  • Executable for running blah files quickly

Quick Start

The quickest way to get started with blah is to utilize the executable:

Install the blah executable:

$ npm install -g b-l-a-h

Run the command line:

$ blah

Philosophy

The blah philosophy is to provide a lightweight robust basic language automation helper, making it a great solution for bash like script runners.

Blah utilizes runners to perform javascript tasks or falls back to npmjs packages.

Examples

To view the examples, clone the Blah repo and install the dependencies:

$ git clone git://github.com/active9/b-l-a-h.git
$ cd b-l-a-h
$ npm install

Then run whichever example you want:

$ node index.js examples/helloworld.blah

Reference

Blah uses triggers to alter an object runner. By default the trigger is set for install/run.

Blah uses the following trigger syntax:

  • [-] Uninstall Handler
  • [~] Start Handler
  • [!] Stop Handler
  • [@] Restart Handler
  • [^] Update Handler
  • [$] Build Handler
  • [#] Rebuild Handler
  • [%] Test Handler
  • [>] System Command Handler
  • [+] Blah Runner Creator
  • [&] Blah Add Package To package.json
  • [] Install Handler (Default No Trigger)

Tutorials

##runners.blah This tutorial teaches the use of blah runners. A runner is simply a script located in the runners folder of your .blah file.

Lets make a folder called test.

mkdir test

Now cd into that folder and create a folder named runners.

cd test
mkdir runners

Within the runners folder lets create a new file called hello.js with the following contents:

module.exports = function() {
	return "Hello";
}

Now go back to the test folder and create a file test.blah with the following contents.

hello

Now run the following command:

blah test.blah

But you aren't done yet. Runners only operate if the file exists within the runners sub folder. If a runner is not found for the specific name the npmjs registry will be used instead. So now lets append a popular package to be installed.

Editing test.blah we now have the following:

hello rpid

This example would try to run the runner hello and then install the package rpid from npmjs.com

Lets alter this example a bit more and uninstall rpid. Editing test.blah we now have the following:

hello -rpid

Now if you ran this example rpid would uninstall from the node_modules folder. Triggers can be used before any package runner name.

##expressupdate.blah Creating a blah update script is simple. Let's create a script that updates express. Save the below text into the file expressupdate.blah

^express

Now run the following within the same folder as expressupdate.blah

blah expressupdate.blah

##savepackage.blah Blah may also be used to add packages to the package.json file while executing at the same time.

&express

##more examples More examples an be found in the examples folder on github.

Error Handling

Basic Language Automation Helper is designed to run in a try catch method. Currently all errors are sent directly to the console. Your script may contain errors and still fully execute as B-L-A-H does not halt on errors.

License

MIT