{"_id":"observatory","_rev":"941707","name":"observatory","description":"Beautiful UI for showing tasks running on the command line.","dist-tags":{"latest":"1.0.0"},"maintainers":[{"name":"dylang","email":""}],"time":{"modified":"2021-09-23T02:08:03.000Z","created":"2013-10-16T04:22:05.323Z","1.0.0":"2015-10-15T12:45:24.753Z","0.1.1":"2014-01-28T15:21:54.166Z","0.1.0":"2013-10-20T21:24:11.301Z","0.0.1":"2013-10-16T04:22:05.323Z"},"users":{"julien-f":true,"antixrist":true,"wmhilton":true,"maxidr":true,"mccoyjordan":true,"noim":true,"brend":true,"oceanic":true,"johnsmithcoder":true,"wyvernzora":true},"author":{"name":"Dylan Greene","email":"dylang@gmail.com"},"repository":{"type":"git","url":"git://github.com/dylang/observatory.git"},"versions":{"1.0.0":{"name":"observatory","description":"Beautiful UI for showing tasks running on the command line.","version":"1.0.0","homepage":"https://github.com/dylang/observatory","author":{"name":"Dylan Greene","email":"dylang@gmail.com"},"repository":{"type":"git","url":"git://github.com/dylang/observatory.git"},"bugs":{"url":"https://github.com/dylang/observatory/issues"},"license":"MIT","main":"lib/observatory","scripts":{"test":"mocha && jshint lib test"},"devDependencies":{"chai":"^3.3.0","faker":"^3.0.1","jshint":"^2.8.0","mocha":"^2.3.3","q":"^1.4.1"},"keywords":["task","watch","status","bower","bower log","logging"],"dependencies":{"ansi-escapes":"^1.1.0","chalk":"^1.1.1","lodash":"^3.10.1"},"gitHead":"6bc860312920a074972a2efc9267618ddae114de","_id":"observatory@1.0.0","_shasum":"2baa606e8299e6866914ec9c8a4db6a41136e59b","_from":".","_npmVersion":"2.13.2","_nodeVersion":"0.11.14","_npmUser":{"name":"dylang","email":"dylang@gmail.com"},"dist":{"shasum":"2baa606e8299e6866914ec9c8a4db6a41136e59b","size":5744,"noattachment":false,"key":"/observatory/-/observatory-1.0.0.tgz","tarball":"http://registry.cnpm.dingdandao.com/observatory/download/observatory-1.0.0.tgz"},"maintainers":[{"name":"dylang","email":""}],"directories":{},"publish_time":1444913124753,"_cnpm_publish_time":1444913124753,"_hasShrinkwrap":false},"0.1.1":{"name":"observatory","description":"Beautiful UI for showing tasks running on the command line.","version":"0.1.1","homepage":"https://github.com/dylang/observatory","author":{"name":"Dylan Greene","email":"dylang@gmail.com"},"repository":{"type":"git","url":"git://github.com/dylang/observatory.git"},"bugs":{"url":"https://github.com/dylang/observatory/issues"},"licenses":[{"type":"MIT","url":"https://github.com/dylang/observatory/blob/master/LICENSE-MIT"}],"main":"lib/observatory","engines":{"node":">= 0.8.0"},"scripts":{"test":"grunt test"},"devDependencies":{"grunt-contrib-jshint":"~0.8.0","grunt-contrib-watch":"~0.5.1","grunt":"~0.4.1","chai":"~1.8.1","grunt-notify":"~0.2.7","Faker":"~0.5.11","grunt-cafe-mocha":"~0.1.8","q":"~1.0.0"},"keywords":["task","watch","status","bower","bower log","logging"],"dependencies":{"cli-color":"~0.2.2","lodash":"~2.4.1"},"_id":"observatory@0.1.1","dist":{"shasum":"045fdfe1c101012efc87bb235d4bbf0c149a3604","size":6456,"noattachment":false,"key":"/observatory/-/observatory-0.1.1.tgz","tarball":"http://registry.cnpm.dingdandao.com/observatory/download/observatory-0.1.1.tgz"},"_from":".","_npmVersion":"1.3.24","_npmUser":{"name":"dylang","email":"dylang@gmail.com"},"maintainers":[{"name":"dylang","email":""}],"directories":{},"publish_time":1390922514166,"_cnpm_publish_time":1390922514166,"_hasShrinkwrap":false},"0.1.0":{"name":"observatory","description":"Beautiful UI for showing tasks running on the command line.","version":"0.1.0","homepage":"https://github.com/dylang/observatory","author":{"name":"Dylan Greene","email":"dylang@gmail.com"},"repository":{"type":"git","url":"git://github.com/dylang/observatory.git"},"bugs":{"url":"https://github.com/dylang/observatory/issues"},"licenses":[{"type":"MIT","url":"https://github.com/dylang/observatory/blob/master/LICENSE-MIT"}],"main":"lib/observatory","engines":{"node":">= 0.8.0"},"scripts":{"test":"grunt test"},"devDependencies":{"grunt-contrib-jshint":"~0.6.0","grunt-contrib-watch":"~0.5.1","grunt":"~0.4.1","chai":"~1.8.1","grunt-notify":"~0.2.7","Faker":"~0.5.11","grunt-cafe-mocha":"~0.1.8","q":"~0.9.7"},"keywords":["task","watch","status","bower","bower log","logging"],"dependencies":{"cli-color":"~0.2.2","lodash":"~2.2.1"},"readmeFilename":"README.md","_id":"observatory@0.1.0","dist":{"shasum":"e6348d8242451f6c46c9bf8cf5c60849364cf33f","size":6438,"noattachment":false,"key":"/observatory/-/observatory-0.1.0.tgz","tarball":"http://registry.cnpm.dingdandao.com/observatory/download/observatory-0.1.0.tgz"},"_from":".","_npmVersion":"1.3.11","_npmUser":{"name":"dylang","email":"dylang@gmail.com"},"maintainers":[{"name":"dylang","email":""}],"directories":{},"publish_time":1382304251301,"_cnpm_publish_time":1382304251301,"_hasShrinkwrap":false},"0.0.1":{"name":"observatory","description":"Beautiful UI for showing tasks running on the command line.","version":"0.0.1","homepage":"https://github.com/dylang/observatory","author":{"name":"Dylan Greene","email":"dylang@gmail.com"},"repository":{"type":"git","url":"git://github.com/dylang/observatory.git"},"bugs":{"url":"https://github.com/dylang/observatory/issues"},"licenses":[{"type":"MIT","url":"https://github.com/dylang/observatory/blob/master/LICENSE-MIT"}],"main":"lib/observatory","engines":{"node":">= 0.8.0"},"scripts":{"test":"grunt nodeunit"},"devDependencies":{"grunt-contrib-jshint":"~0.6.0","grunt-contrib-watch":"~0.5.1","grunt":"~0.4.1","chai":"~1.8.1","grunt-notify":"~0.2.7","Faker":"~0.5.11","grunt-cafe-mocha":"~0.1.8"},"keywords":[],"dependencies":{"cli-color":"~0.2.2"},"readmeFilename":"README.md","_id":"observatory@0.0.1","dist":{"shasum":"44d8ca7fc1f99dc7aec8110d88bfcfa97170b75f","size":11168,"noattachment":false,"key":"/observatory/-/observatory-0.0.1.tgz","tarball":"http://registry.cnpm.dingdandao.com/observatory/download/observatory-0.0.1.tgz"},"_from":".","_npmVersion":"1.3.11","_npmUser":{"name":"dylang","email":"dylang@gmail.com"},"maintainers":[{"name":"dylang","email":""}],"directories":{},"publish_time":1381897325323,"_cnpm_publish_time":1381897325323,"_hasShrinkwrap":false}},"readme":"# Observatory [![Build Status](https://secure.travis-ci.org/dylang/observatory.svg?branch=master)](http://travis-ci.org/dylang/observatory)\n\n> Beautiful UI for showing tasks running on the command line.\n\n## Purpose\n\nInstead of just logging long running tasks to the console, give your users a simple status dashboard.\n\n![observatory](https://f.cloud.github.com/assets/51505/1339977/2cccefbe-361a-11e3-9cca-3bcf74f7e59b.gif)\n\n## Installation\n\n```bash\n$ npm -g install observatory\n```\n\n## Examples\n\n### `node ./examples/buzzwords.js`\n\nAn example using fake data that tries to look like a real-world usage.\n\n### `node ./examples/long-line.js`\n\nAn example of what happens when text is so long it needs to wrap to another line.\n\n## Usage Example\n\n```js\nvar observatory = require('observatory');\n\n//add a task to display\nvar task = observatory.add('Install packages...');\n\n//while working on the task, update the status\ntask.running('Copying Files');\n\n//optionally give details\ntask.details(percent + '% ' + filename);\n\n//chain commands\ntask.status('Compressing Images')\n    .details(directoryName);\n\n//when complete\ntask.done('Finished!');\n\n//or if it failed\ntask.fail('Ooops');\n```\n\n## Terminology\n\n```text\n[Test Runner] Running tests on Safari  Running Now  50%  CSS3 Tests\n⇧ prefix      ⇧ description            ⇧ status     ⇧ details\n```\n\n## API\n\n### `observatory.add(description)`\n\n`description` _string_ Required description.  \n**returns** a new `task`\n\nAdds a task to the console. This method returns a `task` object, you should store it in a variable so you can use it for the methods bellow.\n\n```\nvar copyFilesTask = observatory.add('Copy files');\n```\n\n## Task Methods\n\nAll task methods return the `task` object so that you can chain functions, such as `task.done().status('Installed!');`.\n\n### `task.status(statusLabel)`\n\n`statusLabel` _string_ Set the status value.\n\nDisplays a short message to the right of the description. Use it to show users in a word or two that suggests what is happening.\n\nExamples:\n\n* `task.status('Downloading');`\n* `task.status('Running');`\n* `task.status('Complete');`\n\n### `task.details(detailsLabel)`\n\n`detailsLabel` _string_ Set the details value.\n\nOptional provide details about what's happening, such as file names, urls, tests names.\n\nExamples:\n\n* `task.details('Copying var/tmp/whatever to var/whater/tmp');`\n* `task.details('Compressing bigimage.png');`\n* `task.details('Testing services');`\n\n### `task.done(statusLabel)`\n\n`statusLabel` _string_ Set the status value. Default: `✓ Done`.\n\n* `task.done();`\n* `task.done('Compressed!')`\n\n### `task.fail(statusLabel)`\n\n`statusLabel` _string_ Set the status value. Default: `✗ Failed`.\n\n* `task.fail();`\n* `task.fail('Disconnected');\n\n\n## Override Settings\n\n### `observatory.settings(settingsObject)`\n\nTweak how tasks are rendered. \n\n`settingsObject`\n\n* `width` Integer, width in _characters_ of the `description` and `status` area. This is used to right justify the `status`. Default is `55`.\n* `prefix` Sting, Text to prepend each line. Default is `' ⫸  '`.\n* `write` Function(content). Writes the content to the output. Defaults to `process.stdout.write`.\n* `formatStatus` Function(statusLabel, STATE)\n\n> **returns** `observatory` so you can use it on the `require` statement.\n\n```\nvar observatory = require('observatory').settings({\n  prefix: '[bower] '.white\n});\n```\n\n### observatory.STATE\n\nA constant for the different states. Only useful if you need to change `formatStatus` above.\n\nThe values:\n\n* `observatory.STATE.active` Defaults to using default console color.\n* `observatory.STATE.done` Defaults to using green.\n* `observatory.STATE.fail` Defaults to using red.\n\n## Acknowledgements\n\n### Inspiration\n\n* My coworker Nick at Opower for inspiring the need for this library.\n* Bower, inspiring the clean layout.\n* Inqurire.js, for showing console apps can have a nice UI.\n\n\n## Release History\n* 15 October 2015 - 1.0.0 - Update dependencies, fix tests and bugs thanks to @rstacruz.\n* 20 October 2013 - 0.1.0 - Some cleanup thanks to @nickheiner, new write method.\n* 15 October 2013 - 0.0.1 - First version\n\n## License\nCopyright (c) 2015 Dylan Greene  \nLicensed under the MIT license.\n","_attachments":{},"homepage":"https://github.com/dylang/observatory","bugs":{"url":"https://github.com/dylang/observatory/issues"},"license":"MIT"}