{"id":13526462,"url":"https://github.com/npm/init-package-json","last_synced_at":"2025-05-13T19:04:46.144Z","repository":{"id":482648,"uuid":"4689678","full_name":"npm/init-package-json","owner":"npm","description":"A node module to get your node module started","archived":false,"fork":false,"pushed_at":"2025-05-05T15:03:51.000Z","size":745,"stargazers_count":320,"open_issues_count":7,"forks_count":152,"subscribers_count":39,"default_branch":"main","last_synced_at":"2025-05-05T15:49:23.919Z","etag":null,"topics":["npm-cli"],"latest_commit_sha":null,"homepage":"","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/npm.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE.md","code_of_conduct":"CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":".github/CODEOWNERS","security":"SECURITY.md","support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2012-06-17T04:44:06.000Z","updated_at":"2025-05-05T15:02:23.000Z","dependencies_parsed_at":"2024-01-13T22:25:10.934Z","dependency_job_id":"f506341b-4c66-4ee1-b9ae-6e8ff8cb9da0","html_url":"https://github.com/npm/init-package-json","commit_stats":{"total_commits":293,"total_committers":43,"mean_commits":6.813953488372093,"dds":0.8327645051194539,"last_synced_commit":"eab6037c8b9bb5570dfb1efa5f8350f7f29859fc"},"previous_names":[],"tags_count":72,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/npm%2Finit-package-json","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/npm%2Finit-package-json/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/npm%2Finit-package-json/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/npm%2Finit-package-json/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/npm","download_url":"https://codeload.github.com/npm/init-package-json/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":254010798,"owners_count":21998993,"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":["npm-cli"],"created_at":"2024-08-01T06:01:30.077Z","updated_at":"2025-05-13T19:04:46.113Z","avatar_url":"https://github.com/npm.png","language":"JavaScript","funding_links":[],"categories":["JavaScript","others"],"sub_categories":[],"readme":"# init-package-json\n\nA node module to get your node module started.\n\n## Usage\n\n```javascript\nconst init = require('init-package-json')\nconst path = require('path')\n\n// a path to a promzard module.  In the event that this file is\n// not found, one will be provided for you.\nconst initFile = path.resolve(process.env.HOME, '.npm-init')\n\n// the dir where we're doin stuff.\nconst dir = process.cwd()\n\n// extra stuff that gets put into the PromZard module's context.\n// In npm, this is the resolved config object.  Exposed as 'config'\n// Optional.\nconst configData = { some: 'extra stuff' }\n\n// Any existing stuff from the package.json file is also exposed in the\n// PromZard module as the `package` object.  There will also be three\n// vars for:\n// * `filename` path to the package.json file\n// * `basename` the tip of the package dir\n// * `dirname` the parent of the package dir\n\nconst data = await init(dir, initFile, configData)\n// the data's already been written to {dir}/package.json\n// now you can do stuff with it\n```\n\nSee [PromZard](https://github.com/npm/promzard) for details about\nwhat can go in the config file.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnpm%2Finit-package-json","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fnpm%2Finit-package-json","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnpm%2Finit-package-json/lists"}