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

Convention-based build tool for Node.js projects.

  • 0.4.2
  • Source
  • npm
  • Socket score

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

Bob http://travis-ci.org/cliffano/bob

Convention-based build tool for Node.js projects.

Installation

npm install -g bob

Project Convention

Mandatory:

  • package.json - project descriptor file
  • lib/ - directory containing JavaScript library files
  • test/ - directory containing JavaScript test files

Optional (only relevant when project is an app):

  • {name}.js - main app file, must support node {name}.js start|stop|restart|status
  • run/ - directory containing any runtime information like pid or log files

Reserved and generated by Bob:

  • build/ - directory containing build reports and artifacts

Usage

Bob can be run from the project root directory (same level as package.json file).

Install project dependencies (per Node.js project):

bob dep

Run Bob from project directory:

bob target1 target2 target3 ...

Run Bob with specific environment: (if unspecified, NODE_ENV defaults to 'development')

NODE_ENV=production bob start

Run Bob in robot mode and generate XML reports: (if unspecified, BOB_MODE defaults to 'human')

BOB_MODE=robot bob lint test

Targets

depInstall all dependencies specified in package.json file by executing npm install . .
toolsInstall all Bob CLI dependencies in global scope.
cleanDelete build/ and run/ directories, along with any nohup.* and *.log files.
lintRun jshint/node-jshint or tav/nodelint against all .js files in lib/ and test/ directories.
styleRun nomiddlename/jscheckstyle against all .js files in lib/ directory.
testRun cloudhead/vows against all .js files in test/ directory. If {scripts.test} is available, then npm test will be executed instead.
coverage (experimental)Run visionmedia/node-jscoverage via cloudhead/vows against all .js files in test/ and lib/ directories.
docRun nodeca/ndoc against all .js files in lib/ directory.
versionupUpgrade patch version number in package.json file.
versionup-minorUpgrade minor version number in package.json file.
versionup-majorUpgrade major version number in package.json file.
template (experimental)Populate variables in template files with values from package.json file.
stopStop the app by executing node {name}.js stop . If {scripts.stop} is configured, then npm stop will be executed instead.
startStart the app by executing node {name}.js start . If {scripts.start} is configured, then npm start will be executed instead.
restartRestart the app by executing node {name}.js restart . If {scripts.restart} is configured, then npm restart will be executed instead.
statusDisplay app status by executing node {name}.js status .
nukeKill all processes with command containing the word 'node' .
packageCreate a .tar.gz package file at build/artifact/ directory, along with md5 and sha1 checksums of the package file.
package-meta (experimental)Create a meta file to build/artifact, along with md5 and sha1 checksums of the meta file.
deploy (experimental)Upload the .tar.gz package file to a remote location, either via SCP or FTP.
ssh-unpack (experimental)(SSH only) Deploy, then remotely unpack the .tar.gz package file.
ssh-restart (experimental)(SSH only) Deploy, unpack, then remotely execute node {name.js} restart .
ssh-mkdir (experimental)(SSH only) Remotely create the directory to deploy the package file to.

Config

Even though it's recommended to follow the project convention further above, it is possible to customise Bob's build target parameters.

Create a .bob.json file on the project's root directory (same level as package.json), containing a JSON object with this format:

{
  "x": {
    "y": "z"
  }
}

x.y properties will be used as BOB_X_Y in Bob's Makefile.

Check out the Makefile for a full list of parameters. NOTE: only the parameters prefixed with BOB_ are customisable.

Continuous Integration

###Travis CI

Configure the project's .travis.yml file:

before_install: "npm install -g bob"
script: "bob clean lint test coverage"

###Jenkins CI

Install Bob on the server, then configure a job with shell script build step:

bob clean lint test coverage;

Colophon

Follow @cliffano on Twitter.

Keywords

FAQs

Package last updated on 25 Mar 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