Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

bob

Package Overview
Dependencies
Maintainers
1
Versions
72
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

bob

A minimalistic build tool for Node.js projects.

  • 0.3.3
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
48
decreased by-30.43%
Maintainers
1
Weekly downloads
 
Created
Source

Bob

A minimalistic build tool for Node.js projects.

Installation

npm install -g bob

Usage

Install project dependencies (per Node.js project):

bob dep

Run Bob from project directory:

bob target1 target2 target3 ...

Run Bob with specific environment (by default it uses NODE_ENV=development):

NODE_ENV=production bob start

Run Bob in robot mode (generate XML reports):

BOB_MODE=robot bob style lint test

Project Convention

  • package.json - project descriptor
  • lib/ - .js library files
  • test/ - .js test files
  • build/ - reserved and generated by Bob to store buildtime reports/artifacts
  • run/ - reserved and generated by Bob to store runtime logs/pids
  • (optional, only relevant when your project is an app) {name}.js - main app file, must support node {name}.js start|stop|restart|status

Targets

  • clean - Delete build/ and run/ directories, along with any nohup.* and *.log files
  • style - Run jscheckstyle against all .js files under lib/ directory, configurable via {bob.style.files}
  • lint - Run jshint or nodelint against all .js files under lib/ and test/ directories, configurable via {bob.lint.files}
  • test - Run vows against all .js files under test/ directory, configurable via {bob.test.files}. Run npm test if scripts.test exists in package.json
  • coverage - Run vows against all .js files under test/ directory with coverage flag, configurable via {bob.coverage.files}
  • package - Create a .tar.gz package at build/artifact/ directory, along with md5 and sha1 checksums.
  • package-meta - Add a meta file to build/artifact, along with md5 and sha1 checksums.
  • versionup - Upgrade build version number in package.json
  • versionup-minor - Upgrade minor version number in package.json
  • versionup-major - Upgrade major version number in package.json
  • template - Replace variables in template files with values from package.json. E.g. bob.template config in Config example above, will replace ${version} and ${name} in conf/artifact-meta.json with '0.0.1' and 'myproject'
  • stop - Stop the app. Run npm stop if scripts.stop exists in package.json
  • start - Start the app. Run npm start if scripts.start exists in package.json
  • restart - Restart the app. Run npm restart if scripts.restart exists in package.json
  • status - Display app status
  • nuke - Kill all processes with command containing the word 'node'
  • send - Send the artifacts to {bob.deploy.user}@{bob.deploy.host}:{bob.deploy.port} at {bob.deploy.dir}, remember to configure the private key for the specified user
  • deploy - Send, then unpack the main .tar.gz artifact
  • deploy-r - Deploy the package and then remotely restart the app

Config

Bob reads package.json file. NOTE:

  • each property under "bob" is optional
  • bob property value with ${name} or ${version} will be populated with name and version values accordingly

Example:

{
    "name": "myproject",
    "version": "0.0.1",
    "bob": {
        "src": {
            "dir": "mysrc/"
        },
        "style": {
            "files": "foo.js bar/",
            "opts": "--checkstyle"
        },
        "lint": {
            "files": "foo.js bar/",
            "opts": "--jslint-reporter --config path/to/hintconfig.js"
        },
        "lintstrict": {
            "files": "foo.js bar/",
            "opts": "--reporter path/to/lintreporter.js --config path/to/lintconfig.js"
        },
        "test": {
            "files": "bar/*.js",
            "opts": "--dot-matrix"
        },
        "coverage": {
            "files": "bar/*.js",
            "opts": "--cover-html"
        },
        "packagemeta": {
            "dir": "conf",
            "file": "artifact-meta.json"
        },
        "template": {
            "conf/artifact-meta.json": ["version", "name"]
        },
        "deploy": {
            "user": "myuser",
            "key": "/local/path/to/mykey"
            "host": "myremotehost",
            "port": 22,
            "dir": "/remote/path/to/${name}/${version}"
        }
    }
}

Colophon

Follow @cliffano on Twitter.

Keywords

FAQs

Package last updated on 24 Feb 2012

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc