strike

0.1.73 • Public • Published

Strike

Modular bash using require(3) for *NIX systems. Depends upon bash >= 4.2 for some useful features.

Synopsis

Brings structure and modularity to bash programs and provides a set of modules that can be used from any bash program.

Semantic Versioning

This software is currently under development in the 0.x.x version range and is released using the semver(7) semantic versioning specification.

Features

Core

Process

  • Be safe, declare process.use strict
  • Daemonize any process with process.daemon.start!
  • Make a process behave as a singleton with process.lock.use!
  • Easily add PID file management with process.pid.use!
  • Map trap signals to command methods with the process.signal.* commands, see process(3)

Test

  • Write test-driven programs using the test task for bake(1)
  • Use assert(3) to perform inline assertions

Documentation & Help

  • Document your program using inline heredoc comments and publish to html and man pages using the doc.* tasks for bake(1)
  • Publish documentation as github pages with the doc.pages.push bake(1) task
  • Easily display program help as man pages with help(3)

Extensions & Executables

Prerequisites

Most modern distributions ship with the binaries that some parts of the library depend upon. However on extremely minimal distributions you should install the list below.

It is recommended (although not essential) that you have these executables:

BSD users (that's OS X users too) should install GNU versions for find(1) and tar(1).

Installation

To install the library code as a dependency for a project into the node_modules sub-folder use:

npm install strike

If you want the supplied executables to be available in $PATH use the global flag:

npm install -g strike

Documentation

The project documentation is available as html man pages.

Developers

Developers should have node(1) (which includes npm(1)) in order to run the tests.

Running Tests

For illustrative purposes the ./bake test runner is also available using the following commands:

If you prefer npm(1) use the test command:

npm test

If you prefer rake(1) use the test task:

rake test

If you prefer ant(1) use the test target:

ant test

If you prefer mvn(1) use the test goal:

mvn test

To verify all build tools are executing tests correctly use this one-liner:

npm test && rake test && ant test && mvn test && ./bake test

Dependencies

Some dependencies required to run the tests that may not be available on very minimal installations:

  • zip(1)
  • unzip(1)
  • tar(1)
  • man(1)

In addition it is recommended for all tests to run that you have the following executables and an active internet connection:

Generating Documentation

Documentation for the repository is generated using ronn(1) which must be installed, to generate documentation use task-doc(7):

npm run-script doc

Which is an alias for:

./bake doc man build

Note that currently you will need to apply this patch to ronn(1) for documentation to build correctly.

License

Everything is MIT. Read the license if you feel inclined.

Readme

Keywords

none

Package Sidebar

Install

npm i strike

Weekly Downloads

24

Version

0.1.73

License

none

Last publish

Collaborators

  • muji
  • tmpfs