{"id":17812292,"url":"https://github.com/nmicht/create-nodejs-project","last_synced_at":"2025-03-17T22:30:49.929Z","repository":{"id":34035795,"uuid":"165705580","full_name":"nmicht/create-nodejs-project","owner":"nmicht","description":"A npm project initializer to scafold a project and include basic tools like lint, testing, etc.","archived":false,"fork":false,"pushed_at":"2022-12-08T10:28:17.000Z","size":329,"stargazers_count":21,"open_issues_count":16,"forks_count":20,"subscribers_count":2,"default_branch":"master","last_synced_at":"2024-10-06T10:39:23.610Z","etag":null,"topics":["initializer","javascript","node","node-js","nodejs","npm-init","npm-package"],"latest_commit_sha":null,"homepage":null,"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/nmicht.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","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":"2019-01-14T17:36:58.000Z","updated_at":"2024-04-26T13:29:21.000Z","dependencies_parsed_at":"2023-01-15T04:06:58.471Z","dependency_job_id":null,"html_url":"https://github.com/nmicht/create-nodejs-project","commit_stats":null,"previous_names":[],"tags_count":7,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nmicht%2Fcreate-nodejs-project","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nmicht%2Fcreate-nodejs-project/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nmicht%2Fcreate-nodejs-project/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nmicht%2Fcreate-nodejs-project/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/nmicht","download_url":"https://codeload.github.com/nmicht/create-nodejs-project/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":221701792,"owners_count":16866239,"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":["initializer","javascript","node","node-js","nodejs","npm-init","npm-package"],"created_at":"2024-10-27T15:58:59.864Z","updated_at":"2024-10-27T15:59:00.503Z","avatar_url":"https://github.com/nmicht.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003cimg width=\"75px\" height=\"75px\" align=\"right\" alt=\"Create NodeJS Project Logo\" src=\"https://raw.githubusercontent.com/nmicht/create-nodejs-project/master/assets/create-nodejs-project.png\" title=\"Create NodeJS Project\"/\u003e\n\n# Node.js Project Initializer\n\n[![License][license-image]][license-url]\n[![version][npm-image]][npm-url]\n[![downloads][downloads-image]][downloads-url]\n\n\n[![coverage][coverage-image]][coverage-url]\n[![build][build-image]][build-url]\n\nAn [npm initializer][npm/init] to scaffold a node project and include basic tools like lint, testing, etc.\n\n\u003e _`npm init \u003cinitializer\u003e` can be used to set up a new or existing npm package._  \n\u003e _`initializer` in this case is an npm package named `create-\u003cinitializer\u003e`, which will be installed by `npx`, and then have its main bin executed -- presumably creating or updating `package.json` and running any other initialization-related operations._  \n\u003e _[\u0026mdash; Source: `docs.npmjs.com`][npm/init]_\n\n## Requirements\n\n- `npm \u003e= 6.5`\n- `node \u003e= 10.12.0`\n\n## Usage\n\n1. Install the package as global\n```\nnpm install -g create-nodejs-project\n```\n\n2. Run the setup configuration\n```\ncreate-nodejs-project setup\n```\nYou will be prompted for your Github information  \nIf you do not have the information at the moment, you can keep it empty.  \nIn order to create projects with Github integration, you will need to add the authentication information later. See [Github Auth](#configure-Github-authentication)\n\n3. Create your project\n```\nnpm init nodejs-project path/to/new/project\n```\n\n## What it does\n\n1. Create the folder for the new project\n1. Guide you through a questionnaire to setup the project\n2. Initialize a git repository\n3. Copy the template files (src, eslintrc, gitignore, readme, etc)\n4. Create a Github repository\n5. Install eslint dependencies\n5. Install the selected testing dependencies\n6. Generate package.json with all the project details\n7. Commit and push the initial commit\n8. Generate the license file\n\n## About this package\n\nEvery time that I start a new project in Node.js, I hate to go to other project folder, copy files like eslintrc, editorconfig; install the same dependencies, create folder structure, etc.\n\nWith this in mind, the motivation to build this package started as a **DRY** (Do not repeat yourself) thing.   \n\nThis package is intended to automated the initialization of new Node.js projects and with this have a new folder with everything ready to work, basically an scaffolding tool.  \n\n\n## Future features\n\n1. Unit testing\n7. Options to create the project with parameters instead of questionnaire\n10. A good error handler\n11. Color for the console messages\n12. Improve the template structure (the one that is generated in the new project) to include unit test\n18. Option to questionnaire with all the default values\n2. Logic to handle multiple authentication files and multiple Github accounts\n\n## Configure Github Authentication\n\nIf you are planning to allow this script to create your Github repositories, is required to generate a Github Token.\n\n1. Visit https://github.com/settings/tokens.\n2. Click Generate new token.\n```\n Token Description: (your computer name)\n Scopes:\n     [X] repo\n         [X] repo:status\n         [X] repo_deployment\n         [X] public_repo\n         [X] repo:invite\n```\n3. Click Generate token.\n4. Copy the generated string to a safe place, such as a password safe.\n5. Open Terminal and add the Github token.\n\n```\n# nano /YOUR-NODE_MODULES-PATH/create-nodejs-project/create-nodejs-settings.json\n\n...\n...\n   \"githubAuth\": {\n     \"user\": \"YOUR_USER\",\n     \"token\": \"YOUR_TOKEN\"\n   }\n...\n...\n```\n\n\n\n[license-url]: LICENSE\n[license-image]: https://img.shields.io/github/license/nmicht/create-nodejs-project.svg?style=for-the-badge\u0026logo=appveyor\n\n[npm-url]: https://www.npmjs.com/package/create-nodejs-project\n[npm-image]: https://img.shields.io/npm/v/create-nodejs-project.svg?style=for-the-badge\u0026logo=npm\n\n[npm/init]: https://docs.npmjs.com/cli/init#description\n\n[downloads-url]: https://www.npmjs.com/package/create-nodejs-project\n[downloads-image]: https://img.shields.io/npm/dt/create-nodejs-project.svg?style=for-the-badge\n\n[coverage-url]: https://coveralls.io/github/nmicht/create-nodejs-project?branch=master\n[coverage-image]: https://img.shields.io/coveralls/github/nmicht/create-nodejs-project.svg?style=for-the-badge\n\n[build-url]: https://travis-ci.org/nmicht/create-nodejs-project\n[build-image]: https://img.shields.io/travis/nmicht/create-nodejs-project.svg?logo=travis\u0026style=for-the-badge\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnmicht%2Fcreate-nodejs-project","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fnmicht%2Fcreate-nodejs-project","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnmicht%2Fcreate-nodejs-project/lists"}