{"id":25180656,"url":"https://github.com/base-repos/base-runner","last_synced_at":"2025-07-31T18:33:29.360Z","repository":{"id":65990599,"uuid":"46521983","full_name":"base-repos/base-runner","owner":"base-repos","description":"Orchestrate multiple instances of Base at once.","archived":false,"fork":false,"pushed_at":"2017-07-18T05:28:55.000Z","size":285,"stargazers_count":11,"open_issues_count":2,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-05-07T06:04:36.991Z","etag":null,"topics":["assemble","base","generate","liftoff","runner","toolkit","update","verb"],"latest_commit_sha":null,"homepage":"","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/base-repos.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2015-11-19T21:39:30.000Z","updated_at":"2025-01-31T00:40:07.000Z","dependencies_parsed_at":"2023-02-21T23:16:11.993Z","dependency_job_id":null,"html_url":"https://github.com/base-repos/base-runner","commit_stats":{"total_commits":245,"total_committers":3,"mean_commits":81.66666666666667,"dds":0.01224489795918371,"last_synced_commit":"07d5702771dfe5ced6d07b8a2c2927b9bc738a11"},"previous_names":["node-base/base-runner","base-repos/base-runner"],"tags_count":46,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/base-repos%2Fbase-runner","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/base-repos%2Fbase-runner/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/base-repos%2Fbase-runner/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/base-repos%2Fbase-runner/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/base-repos","download_url":"https://codeload.github.com/base-repos/base-runner/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":252823920,"owners_count":21809713,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["assemble","base","generate","liftoff","runner","toolkit","update","verb"],"created_at":"2025-02-09T16:19:13.989Z","updated_at":"2025-05-07T06:04:44.242Z","avatar_url":"https://github.com/base-repos.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# base-runner [![NPM version](https://img.shields.io/npm/v/base-runner.svg?style=flat)](https://www.npmjs.com/package/base-runner) [![NPM monthly downloads](https://img.shields.io/npm/dm/base-runner.svg?style=flat)](https://npmjs.org/package/base-runner) [![NPM total downloads](https://img.shields.io/npm/dt/base-runner.svg?style=flat)](https://npmjs.org/package/base-runner) [![Linux Build Status](https://img.shields.io/travis/node-base/base-runner.svg?style=flat\u0026label=Travis)](https://travis-ci.org/node-base/base-runner)\n\n\u003e Orchestrate multiple instances of base at once.\n\n## Install\n\nInstall with [npm](https://www.npmjs.com/):\n\n```sh\n$ npm install --save base-runner\n```\n\n## Usage\n\n```js\nvar runner = require('base-runner');\nvar Base = require('base');\n\nrunner(Base, options, argv, function(err, app, runnerContext) {\n  // `err`: error object, if an error occurred\n  // `app`: instance of `base` \n  // `runnerContext`: object with `argv`, `env` and `options` properties\n});\n```\n\n**Params**\n\n* `Base` - (required) [base](https://github.com/node-base/base) constructor\n* `options` - (required) configuration options\n* `argv` - (required) parsed `process.argv` object from [minimist](https://github.com/substack/minimist) or whatever argv parser you prefer.\n\n### Example\n\n```js\nvar runner = require('base-runner');\nvar Base = require('base');\nvar config = {\n  name: 'awesome',\n  cwd: process.cwd(),\n  runner: require('./package.json'),\n  processTitle: 'awesome',\n  moduleName: 'awesome',\n  extensions: {\n    '.js': null\n  }\n};\n\nrunner(Base, options, argv, function(err, app, runnerContext) {\n  // `err`: error object, if an error occurred\n  // `app`: instance of `base` \n  // `runnerContext`: object with `argv`, `env` and `options` properties\n});\n```\n\n## API\n\n### [runner](index.js#L40)\n\nCreate a `runner` with the given `constructor`, [liftoff](https://github.com/js-cli/js-liftoff) `config` object, `argv` object and `callback` function.\n\n**Params**\n\n* `Ctor` **{Function}**: Constructor to use, must inherit [base](https://github.com/node-base/base).\n* `config` **{Object}**: The config object to pass to [liftoff](https://github.com/js-cli/js-liftoff).\n* `argv` **{Object}**: Argv object, optionally pre-parsed.\n* `cb` **{Function}**: Callback function, which exposes `err`, `app` (base application instance) and `runnerContext`\n* `returns` **{Object}**\n\n**Example**\n\n```js\nvar Base = require('base');\nvar argv = require('minimist')(process.argv.slice(2));\nvar config = {\n  name: 'foo',\n  cwd: process.cwd(),\n  extensions: {'.js': null}\n};\n\nrunner(Base, config, argv, function(err, app, runnerContext) {\n  if (err) throw err;\n  // do stuff with `app` and `runnerContext`\n  process.exit();\n});\n```\n\n## Events\n\nThe following constructor events are emitted:\n\n* [preInit](#preInit)\n* [init](#init)\n* [postInit](#postInit)\n\n### preInit\n\nExposes `runnerContext` as the only paramter.\n\n```js\nBase.on('preInit', function(runnerContext) {\n});\n```\n\n### init\n\nExposes `runnerContext` and `app` (the application instance) as paramters.\n\n```js\nBase.on('init', function(runnerContext, app) {\n});\n```\n\n### postInit\n\nExposes `runnerContext` and `app` (the application instance) as paramters.\n\n```js\nBase.on('postInit', function(runnerContext, app) {\n});\n```\n\n### finished\n\nExposes `runnerContext` and `app` (the application instance) as paramters.\n\n```js\nBase.on('finished', function(runnerContext, app) {\n});\n```\n\n## About\n\n### Related projects\n\n* [base-generators](https://www.npmjs.com/package/base-generators): Adds project-generator support to your `base` application. | [homepage](https://github.com/node-base/base-generators \"Adds project-generator support to your `base` application.\")\n* [base-option](https://www.npmjs.com/package/base-option): Adds a few options methods to base, like `option`, `enable` and `disable`. See the readme… [more](https://github.com/node-base/base-option) | [homepage](https://github.com/node-base/base-option \"Adds a few options methods to base, like `option`, `enable` and `disable`. See the readme for the full API.\")\n* [base-plugins](https://www.npmjs.com/package/base-plugins): Adds 'smart plugin' support to your base application. | [homepage](https://github.com/node-base/base-plugins \"Adds 'smart plugin' support to your base application.\")\n* [base-store](https://www.npmjs.com/package/base-store): Plugin for getting and persisting config values with your base-methods application. Adds a 'store' object… [more](https://github.com/node-base/base-store) | [homepage](https://github.com/node-base/base-store \"Plugin for getting and persisting config values with your base-methods application. Adds a 'store' object that exposes all of the methods from the data-store library. Also now supports sub-stores!\")\n* [base-task](https://www.npmjs.com/package/base-task): base plugin that provides a very thin wrapper around [https://github.com/doowb/composer](https://github.com/doowb/composer) for adding task methods to… [more](https://github.com/node-base/base-task) | [homepage](https://github.com/node-base/base-task \"base plugin that provides a very thin wrapper around \u003chttps://github.com/doowb/composer\u003e for adding task methods to your application.\")\n* [base](https://www.npmjs.com/package/base): Framework for rapidly creating high quality node.js applications, using plugins like building blocks | [homepage](https://github.com/node-base/base \"Framework for rapidly creating high quality node.js applications, using plugins like building blocks\")\n\n### Contributing\n\nPull requests and stars are always welcome. For bugs and feature requests, [please create an issue](../../issues/new).\n\n### Contributors\n\n| **Commits** | **Contributor** | \n| --- | --- |\n| 239 | [jonschlinkert](https://github.com/jonschlinkert) |\n| 2 | [doowb](https://github.com/doowb) |\n| 1 | [tunnckoCore](https://github.com/tunnckoCore) |\n\n### Building docs\n\n_(This project's readme.md is generated by [verb](https://github.com/verbose/verb-generate-readme), please don't edit the readme directly. Any changes to the readme must be made in the [.verb.md](.verb.md) readme template.)_\n\nTo generate the readme, run the following command:\n\n```sh\n$ npm install -g verbose/verb#dev verb-generate-readme \u0026\u0026 verb\n```\n\n### Running tests\n\nRunning and reviewing unit tests is a great way to get familiarized with a library and its API. You can install dependencies and run tests with the following command:\n\n```sh\n$ npm install \u0026\u0026 npm test\n```\n\n### Author\n\n**Jon Schlinkert**\n\n* [github/jonschlinkert](https://github.com/jonschlinkert)\n* [twitter/jonschlinkert](https://twitter.com/jonschlinkert)\n\n### License\n\nCopyright © 2017, [Jon Schlinkert](https://github.com/jonschlinkert).\nReleased under the [MIT License](LICENSE).\n\n***\n\n_This file was generated by [verb-generate-readme](https://github.com/verbose/verb-generate-readme), v0.6.0, on July 18, 2017._","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbase-repos%2Fbase-runner","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbase-repos%2Fbase-runner","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbase-repos%2Fbase-runner/lists"}