{"id":23061839,"url":"https://github.com/rrwen/cookiecutter-npm","last_synced_at":"2025-06-23T13:36:53.704Z","repository":{"id":91307817,"uuid":"110076216","full_name":"rrwen/cookiecutter-npm","owner":"rrwen","description":"Personal template for Node.js npm packages with Python cookiecutter","archived":false,"fork":false,"pushed_at":"2018-01-24T21:47:39.000Z","size":56,"stargazers_count":6,"open_issues_count":0,"forks_count":1,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-04-28T14:51:36.639Z","etag":null,"topics":["cli","command","cookiecutter","coveralls","interface","istanbul","json","line","log","node","nodejs","npm","package","personal","pip","python","tape","template","test","travis"],"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/rrwen.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":"2017-11-09T06:25:24.000Z","updated_at":"2024-04-15T13:28:13.000Z","dependencies_parsed_at":null,"dependency_job_id":"0a2f1da5-f39f-4fcc-b353-c43a072b2243","html_url":"https://github.com/rrwen/cookiecutter-npm","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/rrwen/cookiecutter-npm","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rrwen%2Fcookiecutter-npm","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rrwen%2Fcookiecutter-npm/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rrwen%2Fcookiecutter-npm/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rrwen%2Fcookiecutter-npm/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/rrwen","download_url":"https://codeload.github.com/rrwen/cookiecutter-npm/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rrwen%2Fcookiecutter-npm/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":261487520,"owners_count":23166103,"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":["cli","command","cookiecutter","coveralls","interface","istanbul","json","line","log","node","nodejs","npm","package","personal","pip","python","tape","template","test","travis"],"created_at":"2024-12-16T03:18:36.780Z","updated_at":"2025-06-23T13:36:48.684Z","avatar_url":"https://github.com/rrwen.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# cookiecutter-npm\n\nRichard Wen  \nrrwen.dev@gmail.com  \n\nPersonal template for Node.js npm packages with Python cookiecutter.\n\n[![Build Status](https://travis-ci.org/rrwen/cookiecutter-npm.svg?branch=master)](https://travis-ci.org/rrwen/cookiecutter-npm)\n[![GitHub license](https://img.shields.io/github/license/rrwen/cookiecutter-npm.svg)](https://github.com/rrwen/cookiecutter-npm/blob/master/LICENSE)\n\n## Install\n\n1. Install [Python](https://www.python.org/downloads/)\n2. Install [cookiecutter](https://pypi.python.org/pypi/cookiecutter) via `pip`\n3. Install [Node.js](https://nodejs.org/en/)\n\n```\npip install cookiecutter\n```\n\n## Usage\n\n1. Create a template for a [npm](https://www.npmjs.com/) package using the cookiecutter command line interface\n2. Change the directory to the folder with the same name as the `template_name` input\n3. Update and install the developer dependencies using the [npm command](https://docs.npmjs.com/cli/npm)\n\n```\ncookiecutter gh:rrwen/cookiecutter-npm\ncd \u003ctemplate_name\u003e\nnpm update --dev\nnpm run docs\n```\n\nSee [Implementation](#implementation) for more details.\n\n## Developer Notes\n\n### Create Github Repository\n\n1. Ensure [git](https://git-scm.com/) is installed\n2. Change directory to the generated folder `cd \u003ctemplate_name\u003e`\n3. Initialize the repository\n4. Add the generated files to commit\n5. Create an empty [Github repository](https://help.github.com/articles/create-a-repo/) with the same name as `template_name`\n6. Pull any changes if the Github repository is not empty\n7. Push the commit from `4.` to your created Github repository\n\n```\ngit init\ngit add .\ngit commit -a -m \"Initial commit\"\ngit remote add origin https://github.com/\u003cgithub_user\u003e/\u003ctemplate_name\u003e.git\ngit pull origin master --allow-unrelated-histories\ngit push -u origin master\n```\n\n### Useful npm Commands\n\n**Edit** the basic keys in `package.json`:\n\n```\nnpm init\n```\n\n**Install all** dependencies in `package.json`:\n\n```\nnpm install\n```\n\n**Install** a package and add it as a dependency with `--save`:\n\n```\nnpm install --save \u003cpackage-name\u003e\n```\n\n**Uninstall** a package and dependency:\n\n```\nnpm uninstall --save \u003cpackage-name\u003e\n```\n\n**Update all** dependencies in `package.json`:\n\n```\nnpm update --dev\n```\n\n**Test** the package with [tape](https://www.npmjs.com/package/tape):\n\n```\nnpm test\n```\n\n### Implementation\n\nThis template uses [cookiecutter](https://pypi.python.org/pypi/cookiecutter) to create folders and files for [npm](https://www.npmjs.com/) packages in [Node.js](https://nodejs.org/en/).\n\n* The main file is [cookiecutter.json](https://github.com/rrwen/cookiecutter-npm/blob/master/cookiecutter.json) which defines the inputs for the command line interface\n* The inputs then replace any values surrounded with `{{}}` inside the folder [{{cookiecutter.template_name}}](https://github.com/rrwen/cookiecutter-npm/tree/master/%7B%7Bcookiecutter.template_name%7D%7D)\n\n```\n        cookiecutter              \u003c-- template tool\n             |\n      cookiecutter.json           \u003c-- template inputs\n             |\n{{cookiecutter.template_name}}    \u003c-- generated template\n```\n\nThe following files will be created inside a folder with the same name as the `template_name` input:\n\nFile | Description\n--- | ---\n**tests/test.js** | A file that uses [tape]() to test the `index.js` module and logs results into `tests/log/` for the package version specified in `package.json` \n**.gitignore** | A Node [.gitignore](https://git-scm.com/docs/gitignore) automatically generated from github\n**.npmignore** | A file to specify ignoring `tests/logs/*` and `docs/*`\n**.travis.yml** | A [.travis.yml](https://docs.travis-ci.com/user/customizing-the-build/) file for automatic builds and tests\n**LICENSE** | MIT [license file](https://help.github.com/articles/licensing-a-repository/) automatically created from github\n**README.md** | A readme [Markdown](https://daringfireball.net/projects/markdown/) file with header, install, usage, and developer notes sections\n**package.json** | The [npm package.json](https://docs.npmjs.com/files/package.json) specifications with [tape](https://www.npmjs.com/package/tape), [moment](https://www.npmjs.com/package/moment), [istanbul](https://www.npmjs.com/package/istanbul), [coveralls](https://www.npmjs.com/package/coveralls), and [documentation](https://www.npmjs.com/package/documentation) developer dependencies\n**index.js** | The main entry file for the npm package with an exported function consuming an `options` object\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frrwen%2Fcookiecutter-npm","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Frrwen%2Fcookiecutter-npm","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frrwen%2Fcookiecutter-npm/lists"}