{"id":15673167,"url":"https://github.com/jonschlinkert/sync-pkg","last_synced_at":"2025-05-06T22:24:38.702Z","repository":{"id":13990052,"uuid":"16691116","full_name":"jonschlinkert/sync-pkg","owner":"jonschlinkert","description":"Minimalist CLI to sync only basic properties from package.json to bower.json","archived":false,"fork":false,"pushed_at":"2017-03-16T14:36:20.000Z","size":49,"stargazers_count":15,"open_issues_count":0,"forks_count":2,"subscribers_count":4,"default_branch":"master","last_synced_at":"2025-04-19T15:35:51.014Z","etag":null,"topics":["bower","json","package","package-json","pkg","sync"],"latest_commit_sha":null,"homepage":"https://github.com/jonschlinkert","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/jonschlinkert.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":"2014-02-10T09:51:16.000Z","updated_at":"2022-11-29T00:33:53.000Z","dependencies_parsed_at":"2022-07-31T17:38:52.986Z","dependency_job_id":null,"html_url":"https://github.com/jonschlinkert/sync-pkg","commit_stats":null,"previous_names":[],"tags_count":10,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jonschlinkert%2Fsync-pkg","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jonschlinkert%2Fsync-pkg/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jonschlinkert%2Fsync-pkg/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jonschlinkert%2Fsync-pkg/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/jonschlinkert","download_url":"https://codeload.github.com/jonschlinkert/sync-pkg/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":252777737,"owners_count":21802642,"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":["bower","json","package","package-json","pkg","sync"],"created_at":"2024-10-03T15:38:04.612Z","updated_at":"2025-05-06T22:24:38.664Z","avatar_url":"https://github.com/jonschlinkert.png","language":"JavaScript","readme":"# sync-pkg [![NPM version](https://img.shields.io/npm/v/sync-pkg.svg?style=flat)](https://www.npmjs.com/package/sync-pkg) [![NPM downloads](https://img.shields.io/npm/dm/sync-pkg.svg?style=flat)](https://npmjs.org/package/sync-pkg) [![Build Status](https://img.shields.io/travis/jonschlinkert/sync-pkg.svg?style=flat)](https://travis-ci.org/jonschlinkert/sync-pkg)\n\nCLI to sync only basic properties from package.json to bower.json.\n\n## Install\n\nInstall with [npm](https://www.npmjs.com/):\n\n```sh\n$ npm install sync-pkg --save\n```\n\n### API\n\n```js\nvar sync = require('sync-pkg');\n\n// omit fields using glob patterns\nsync(['!description', '!foo*']);\n\n// extend existing bower.json\nsync(null, {\n  extend: true\n});\n\n// allow empty fields\nsync(null, {\n  empty: true\n});\n```\n\n## CLI\n\nRun `sync-pkg` in the command line to create and/or update bower.json.\n\n```sh\n$ sync-pkg\n```\n\n* If `bower.json` exists, it will be updated with values in package.json.\n* If `bower.json` does not exist, you will be asked if you want to create one.\n\n### Commands\n\n#### bower\n\nCreate a bower.json file and/or update the existing bower.json. Equivalent to running `sync-pkg` without the `bower` command, except that it will automatically create a bower.json file if one does not exist, and you will not be prompted.\n\n```sh\n$ sync-pkg bower\n```\n\n#### diff\n\nSee a visual diff of proposed changes between package.json and bower.json. Does not modify any files.\n\n```sh\n$ sync-pkg diff\n```\n\n**Example output**\n\n\u003cimg width=\"669\" alt=\"screen shot 2016-05-13 at 12 50 11 pm\" src=\"https://cloud.githubusercontent.com/assets/383994/15255318/54996aa2-1909-11e6-99a3-90f6129dd7da.png\"\u003e\n\n## properties\n\nThe [following fields](https://github.com/bower/bower.json-spec) from package.json are used:\n\n* `name`: **required**\n* `description`: recommended\n* `license`: recommended\n* `main`: recommended\n* `ignore`: recommended\n* `keywords`: recommended\n\nThese fields are also included, but are considered optional by bower:\n\n* `repository`\n* `homepage`\n* `authors`\n* `dependencies`\n* `devDependencies`\n\nPull requests or feature requests are welcome!\n\n## Related projects\n\nYou might also be interested in these projects:\n\n* [filter-object](https://www.npmjs.com/package/filter-object): Filter an object by its keys or values. Returns a copy of an object filtered… [more](https://www.npmjs.com/package/filter-object) | [homepage](https://github.com/jonschlinkert/filter-object)\n* [load-pkg](https://www.npmjs.com/package/load-pkg): Loads the package.json from the root of the user's current project. | [homepage](https://github.com/jonschlinkert/load-pkg)\n* [omit-empty](https://www.npmjs.com/package/omit-empty): Recursively omit empty properties from an object. Omits empty objects, arrays, strings or zero. | [homepage](https://github.com/jonschlinkert/omit-empty)\n\n## Contributing\n\nPull requests and stars are always welcome. For bugs and feature requests, [please create an issue](https://github.com/jonschlinkert/sync-pkg/issues/new).\n\n## Building docs\n\nGenerate readme and API documentation with [verb](https://github.com/verbose/verb):\n\n```sh\n$ npm install verb \u0026\u0026 npm run docs\n```\n\nOr, if [verb](https://github.com/verbose/verb) is installed globally:\n\n```sh\n$ verb\n```\n\n## Running tests\n\nInstall dev dependencies:\n\n```sh\n$ npm install -d \u0026\u0026 npm test\n```\n\n## Author\n\n**Jon Schlinkert**\n\n* [github/jonschlinkert](https://github.com/jonschlinkert)\n* [twitter/jonschlinkert](http://twitter.com/jonschlinkert)\n\n## License\n\nCopyright © 2016, [Jon Schlinkert](https://github.com/jonschlinkert).\nReleased under the [MIT license](https://github.com/jonschlinkert/sync-pkg/blob/master/LICENSE).\n\n***\n\n_This file was generated by [verb](https://github.com/verbose/verb), v0.9.0, on May 13, 2016._","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjonschlinkert%2Fsync-pkg","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjonschlinkert%2Fsync-pkg","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjonschlinkert%2Fsync-pkg/lists"}