Product
Socket Now Supports uv.lock Files
Socket now supports uv.lock files to ensure consistent, secure dependency resolution for Python projects and enhance supply chain security.
Convention-based build tool for Node.js projects.
This is handy for building (linting, testing the code, checking test code coverage, generating documentation, packaging artifact, etc) a Node.js project, with a minimal-or-zero configuration, by following a set of common convention.
There are two Bob modes, human and robot. By default Bob runs in human mode, generating output in human-readable format (e.g. test result in a plain text list). When robot mode is used, Bob will generate output in machine-parsable format (e.g. test result in XML), which is handy when you're using a continuous integration server that consumes XML files for rendering reports and charts.
Bob works where ever you can run make
.
npm install -g bob
A project must contain:
Run Bob from project directory: (same level as package.json file)
bob clean lint test coverage ...
Run Bob in robot mode: (if unspecified, BOB_MODE defaults to human)
BOB_MODE=robot bob clean lint test coverage
Run Bob with verbose output: (display make arguments and shell commands)
BOB_MODE=robot bob --verbose clean lint test coverage
Run Bob with specific environment: (if unspecified, NODE_ENV defaults to development)
NODE_ENV=production bob start
Target | Description | Types | Parameters |
---|---|---|---|
dep | Install dependencies specified in package.json file by executing npm install . . | - | - |
rmdep | Remove dependencies in node_modules directory. | - | - |
updep | Upgrade all dependencies to latest version. Only use this if you want exact dependencies. | - | - |
tools | Global install the tools used by Bob (e.g. jshint, nodelint, mocha, vows, etc). | - | - |
rmtools | Remove global installation of those tools. | - | - |
clean | Delete .bob directory and *.log files. | - | - |
lint | Lint *.js files in lib/ and test/ directories. | jshint (default), nodelint, esvalidate | bin, opts, files |
style | Run style checker against *.js files in lib/ directory. | jscheckstyle (default) | bin, opts, files |
test | Execute *.js test files in test/ directory. If {scripts.test} is configured in package.json, then npm test will be executed instead. | mocha (default), nodeunit, vows | bin, opts, files |
coverage | Check code coverage. | mocha (default), vows | bin, opts, files |
test-integrationexperimental | Execute *.js integration test files in test-integration/ directory. | mocha (default) | bin, opts, files |
test-acceptanceexperimental | Execute *.js acceptance test files in test-acceptance/ directory. | mocha (default) | bin, opts, files |
depgraph | Generate module dependencies graph. | madge (default) | bin, opts, files |
package | Create a .tar.gz package file in .bob/artifact/ directory, along with md5 and sha1 checksums of the artifact file. | - | src |
publish | Publish artifact file to an artifact repository. | npm (default), ivy | ivy: user, key, host, port, dir |
send | Send the artifact file to a remote server. | scp (default), ftp | user, key, host, port, dir |
stop | Stop the app by executing node {name}.js stop . If scripts.stop is configured in package.json, then npm stop will be executed instead. | - | - |
start | Start the app by executing node {name}.js start . If scripts.start is configured in package.json, then npm start will be executed instead. | - | - |
restart | Restart the app by executing node {name}.js restart . If scripts.restart is configured in package.json, then npm restart will be executed instead. | - | - |
status | Display app status by executing node {name}.js status . | - | - |
versionup | Upgrade patch version number in package.json file. | - | - |
versionup-minor | Upgrade minor version number in package.json file. | - | - |
versionup-major | Upgrade major version number in package.json file. | - | - |
nuke | Kill all processes with command containing the word 'node' . | - | - |
To override the default setting, create .bob.json file in project directory (same level as package.json file). Target type and parameters can be overridden, here are some examples:
To use nodelint instead of the default jshint when running bob lint
:
{
"lint": {
"type": "nodelint"
}
}
To use nodelint instead of the default jshint, and to lint the files in src directory instead of the default lib and test directories, when running bob lint:
{
"lint": {
"type": "nodelint",
"files": "src"
}
}
To add an alias target (called build) which executes clean lint test coverage targets:
{
"build": "clean lint test coverage"
}
###Travis CI
Configure Bob in .travis.yml file:
before_install: "npm install -g bob"
script: "bob clean lint test coverage"
###Jenkins CI
Configure Bob in a Jenkins job with shell script build step:
npm install -g bob
bob clean lint test coverage
0.5.8 - 2012-11-11
FAQs
Convention-based build tool for node.js projects.
The npm package bob receives a total of 37 weekly downloads. As such, bob popularity was classified as not popular.
We found that bob demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 0 open source maintainers collaborating on the project.
Did you know?
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.
Product
Socket now supports uv.lock files to ensure consistent, secure dependency resolution for Python projects and enhance supply chain security.
Research
Security News
Socket researchers have discovered multiple malicious npm packages targeting Solana private keys, abusing Gmail to exfiltrate the data and drain Solana wallets.
Security News
PEP 770 proposes adding SBOM support to Python packages to improve transparency and catch hidden non-Python dependencies that security tools often miss.