{"id":27265875,"url":"https://github.com/sgtlambda/nectar","last_synced_at":"2025-04-11T08:39:20.827Z","repository":{"id":3046731,"uuid":"48285996","full_name":"sgtlambda/nectar","owner":"sgtlambda","description":"Create .tar archive of files matching glob(s)","archived":false,"fork":false,"pushed_at":"2022-02-11T21:54:36.000Z","size":993,"stargazers_count":4,"open_issues_count":6,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-04-06T05:05:11.780Z","etag":null,"topics":[],"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/sgtlambda.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}},"created_at":"2015-12-19T15:01:44.000Z","updated_at":"2019-09-24T16:19:39.000Z","dependencies_parsed_at":"2022-08-06T13:15:07.631Z","dependency_job_id":null,"html_url":"https://github.com/sgtlambda/nectar","commit_stats":null,"previous_names":[],"tags_count":35,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sgtlambda%2Fnectar","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sgtlambda%2Fnectar/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sgtlambda%2Fnectar/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sgtlambda%2Fnectar/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/sgtlambda","download_url":"https://codeload.github.com/sgtlambda/nectar/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248362219,"owners_count":21091072,"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":[],"created_at":"2025-04-11T08:39:20.357Z","updated_at":"2025-04-11T08:39:20.819Z","avatar_url":"https://github.com/sgtlambda.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# [![nectar](media/logo.png)](https://github.com/sgtlambda/nectar)\n\n\u003e Create `.tar` archive of files matching glob(s)\n\nMakes a great team with [extrakt](https://github.com/sgtlambda/extrakt).\n\n[![Build Status][travis-image]][travis-url]\n[![NPM Version][npm-image]][npm-url]\n\n\n## Install\n\n```\n$ npm install --save nectar\n```\n\n\n## Usage\n\n```js\nconst nectar = require('nectar');\n\nawait nectar(['resources/**/*.js'], 'bundle.tar');\n// packs all .js files inside 'resources' into 'bundle.tar'\n```\n\n#### Create `.tar.gz` (using streaming mode)\n\n```js\nconst fs     = require('fs');\nconst zlib   = require('zlib');\n\nconst gZip   = zlib.createGzip();\n\nnectar(['resources/**/*.js'])\n    .pipe(gZip)\n    .pipe(fs.createWriteStream('bundle.tar.gz'));\n```\n\n## API\n\n### nectar(input, [output], [options])\n\nCreates a `.tar` archive containing all files matched by the given input glob(s). The directory structure, relative to the working directory, is preserved.\n\nIf the `output` argument is provided, the archive is written to `output` and a promise is returned for an array of the paths of the matches entries.\nIf no `output` argument is provided, a promise for a readable stream for the archive will be returned.\n\n#### input\n\nType: `string|string[]`\n\nInput glob(s).\n\n#### output\n\nType: `string|WritableStream`\n\nOptional output path or a writable stream.\n\n#### options.cwd\n\nType: `string`\nDefault: `process.cwd()`\n\nOptional working directory for glob matching\n\n## License\n\nMIT © [sgtlambda](http://github.com/sgtlambda)\n\n[![dependency Status][david-image]][david-url]\n[![devDependency Status][david-dev-image]][david-dev-url]\n\n[travis-image]: https://img.shields.io/travis/sgtlambda/nectar.svg?style=flat-square\n[travis-url]: https://travis-ci.org/sgtlambda/nectar\n\n[david-image]: https://img.shields.io/david/sgtlambda/nectar.svg?style=flat-square\n[david-url]: https://david-dm.org/sgtlambda/nectar\n\n[david-dev-image]: https://img.shields.io/david/dev/sgtlambda/nectar.svg?style=flat-square\n[david-dev-url]: https://david-dm.org/sgtlambda/nectar#info=devDependencies\n\n[npm-image]: https://img.shields.io/npm/v/nectar.svg?style=flat-square\n[npm-url]: https://www.npmjs.com/package/nectar\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsgtlambda%2Fnectar","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsgtlambda%2Fnectar","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsgtlambda%2Fnectar/lists"}