{"id":21971782,"url":"https://github.com/cristopher1/generator-quality-npm-package","last_synced_at":"2026-04-07T21:31:39.981Z","repository":{"id":205694383,"uuid":"713587297","full_name":"cristopher1/generator-quality-npm-package","owner":"cristopher1","description":"Yeoman generator to create npm packages with eslint, prettier, commitlint, husky, babel and other tools.","archived":false,"fork":false,"pushed_at":"2024-04-04T01:16:58.000Z","size":1919,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-10-26T12:44:54.086Z","etag":null,"topics":["es5","es6","generator","npm","yeoman","yeoman-generator"],"latest_commit_sha":null,"homepage":"https://www.npmjs.com/package/generator-quality-npm-package","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/cristopher1.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":"2023-11-02T20:33:26.000Z","updated_at":"2024-03-26T00:24:27.000Z","dependencies_parsed_at":"2023-12-15T21:17:58.497Z","dependency_job_id":"f905faca-8d10-4c44-817a-76e29d9b22ec","html_url":"https://github.com/cristopher1/generator-quality-npm-package","commit_stats":{"total_commits":129,"total_committers":1,"mean_commits":129.0,"dds":0.0,"last_synced_commit":"a3092ac1867cd3c0302397884e678b0b39bce215"},"previous_names":["cristopher1/generator-quality-npm-package"],"tags_count":3,"template":false,"template_full_name":null,"purl":"pkg:github/cristopher1/generator-quality-npm-package","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cristopher1%2Fgenerator-quality-npm-package","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cristopher1%2Fgenerator-quality-npm-package/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cristopher1%2Fgenerator-quality-npm-package/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cristopher1%2Fgenerator-quality-npm-package/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/cristopher1","download_url":"https://codeload.github.com/cristopher1/generator-quality-npm-package/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cristopher1%2Fgenerator-quality-npm-package/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":31530641,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-07T16:28:08.000Z","status":"ssl_error","status_checked_at":"2026-04-07T16:28:06.951Z","response_time":105,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"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":["es5","es6","generator","npm","yeoman","yeoman-generator"],"created_at":"2024-11-29T14:55:50.840Z","updated_at":"2026-04-07T21:31:39.963Z","avatar_url":"https://github.com/cristopher1.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003ch1 align=\"center\"\u003eWelcome to generator-quality-npm-package 👋\u003c/h1\u003e\n\u003cp\u003e\n  \u003cimg alt=\"Version\" src=\"https://img.shields.io/badge/version-1.0.2-blue.svg?cacheSeconds=2592000\" /\u003e\n  \u003ca href=\"https://github.com/cristopher1/generator-quality-npm-package#readme\" target=\"_blank\"\u003e\n    \u003cimg alt=\"Documentation\" src=\"https://img.shields.io/badge/documentation-yes-brightgreen.svg\" /\u003e\n  \u003c/a\u003e\n  \u003ca href=\"https://github.com/cristopher1/generator-quality-npm-package/graphs/commit-activity\" target=\"_blank\"\u003e\n    \u003cimg alt=\"Maintenance\" src=\"https://img.shields.io/badge/Maintained%3F-yes-green.svg\" /\u003e\n  \u003c/a\u003e\n  \u003ca href=\"https://github.com/cristopher1/generator-quality-npm-package/blob/master/LICENSE\" target=\"_blank\"\u003e\n    \u003cimg alt=\"License: MIT\" src=\"https://img.shields.io/github/license/cristopher1/generator-quality-npm-package\" /\u003e\n  \u003c/a\u003e\n\u003c/p\u003e\n\n\u003e Yeoman generator to create quality npm packages with eslint, prettier, commitlint, husky, babel and other tools.\n\n### 🏠 [Homepage](https://github.com/cristopher1/generator-quality-npm-package)\n\nThe `generator-quality-npm-package` provides a structure to create a npm package similar to that used in the: [@cljmenez/json-serializer-vue-localstorage-reactive](https://www.npmjs.com/package/@cljimenez/json-serializer-vue-localstorage-reactive), [@cljimenez/json-serializer-core](https://www.npmjs.com/package/@cljimenez/json-serializer-core) and [@cljimenez/json-serializer-base-serializers](https://www.npmjs.com/package/@cljimenez/json-serializer-base-serializers).\nThe structure created by this generator includes:\n\n- [Jest](https://jestjs.io/)\n- [Babel](https://babeljs.io/) with [@babel/cli](https://babeljs.io/docs/babel-cli), [@babel/core](https://babeljs.io/docs/babel-core),\n  [@babel/plugin-transform-runtime](https://babeljs.io/docs/babel-plugin-transform-runtime), [@babel/preset-env](https://babeljs.io/docs/babel-preset-env),\n  [@babel/runtime-corejs3](https://www.npmjs.com/package/@babel/runtime-corejs3) and [core-js](https://www.npmjs.com/package/core-js)\n- [Eslint](https://eslint.org/) with [eslint-config-prettier](https://www.npmjs.com/package/eslint-config-prettier), [eslint-config-standard](https://www.npmjs.com/package/eslint-config-standard),\n  [eslint-plugin-jest](https://www.npmjs.com/package/eslint-plugin-jest), [eslint-plugin-jsdoc](https://www.npmjs.com/package/eslint-plugin-jsdoc), etc.\n- [Prettier](https://prettier.io/) with [prettier-plugin-jsdoc](https://www.npmjs.com/package/prettier-plugin-jsdoc)\n- [Lint-staged](https://www.npmjs.com/package/lint-staged)\n- [Faker](https://fakerjs.dev/)\n- [Commitlint](https://commitlint.js.org/#/)\n- [Rollup](https://rollupjs.org/) with [@rollup/plugin-babel](https://www.npmjs.com/package/@rollup/plugin-babel), [@rollup/plugin-node-resolve](https://www.npmjs.com/package/@rollup/plugin-node-resolve) and [rollup-plugin-dts](https://www.npmjs.com/package/rollup-plugin-dts)\n- [Readme-md-generator](https://github.com/kefranabg/readme-md-generator)\n- [Husky](https://www.npmjs.com/package/husky)\n- Others\n\nExample of a npm package generated by `generator-quality-npm-package`:\n\n![Captura de pantalla (5)](https://github.com/cristopher1/generator-quality-npm-package/assets/21159930/646f3434-d382-4d3c-a24c-bab8e4841bcd)\n\nThis generator uses rollup to create the dist folder. The packages publishes by this generator are exported using the following structure:\n\npackage.json\n\n```json\n\"main\": \"./dist/cjs/index.cjs\",\n\"types\": \"./dist/types/index.d.ts\",\n\"exports\": {\n  \"types\": \"./dist/types/index.d.ts\",\n  \"import\": \"./dist/esm/index.mjs\",\n  \"require\": \"./dist/cjs/index.cjs\"\n},\n\"files\": [\n  \"dist\"\n]\n```\n\n### [Index](#index)\n\n- [Installation](#installation)\n- [The configuration files](#configuration-files)\n- [The question: Do you want to automatically run the scripts that configure the package, then installing the dependencies?](#configuring-the-project-automatically)\n- [The scripts in package.json](#scripts)\n- [Getting To Know Yeoman](#know-yeoman)\n- [Author](#author)\n- [Contributing](#contributing)\n- [Show your support](#support)\n- [License](#license)\n\n## \u003ca id=\"installation\"\u003e\u003c/a\u003e Installation\n\nFirst, install [Yeoman](http://yeoman.io) and generator-quality-npm-package using [npm](https://www.npmjs.com/) (we assume you have pre-installed [node.js](https://nodejs.org/)).\n\n```bash\nnpm install -g yo\nnpm install -g generator-quality-npm-package\n```\n\nThen generate your new project:\n\n```bash\nyo quality-npm-package\n```\n\n## \u003ca id=\"configuration-files\"\u003e\u003c/a\u003e The configuration files\n\nThe configuration files included are:\n\n- Eslint: `.eslintignore` (the files and directories ignored by eslint) and `.eslintrc.json` (configuration used by eslint).\n- Git: `.gitignore` (the files and directories ignored by git).\n- Lint-staged: `.lintstagedrc.json` (configuration used by lint-staged).\n- Prettier: `.prettierignore` (the files and directories ignored by prettier) and `.prettierrc.json` (configuration used by prettier).\n- Babel: `babel.config.json` (configuration used by babel):\n\n  - The `env.buildCommonjs` contains the configuration used to transpile the source code to es5. It is used into `rollup.config.js` and `rollup.config.mjs`.\n\n  - The `env.buildESmodules` contains the configuration used to transpile the source code to es6. It is used into `rollup.config.js` and `rollup.config.mjs`.\n\n  - If the package.json, generated by this generator, contains the field `type:commonjs` will be included the `env.test` property in babel.config.json. That property is used by jest to transpile the source code to es5 before to run the tests.\n\n- Commitlint: `commitlint.config.js` (configuration used by commitlint).\n\n- Jest: `jest.config.js` (configuration used by jest).\n\n- Rollup: `rollup.config.js` and `rollup.config.mjs` (configuration used by rollup).\n\n- TypeScript: `tsconfig.json` (configuration used by TypeScript compiler).\n\n## \u003ca id=\"configuring-the-project-automatically\"\u003e\u003c/a\u003e The question: Do you want to automatically run the scripts that configure the package, then installing the dependencies?\n\nWhen you selects the true value, the following scripts ubicated in the package.json are executed:\n\n- `init`\n- `documentation:create`\n- `test`\n- `build`\n\nIf you selects the false value, you must run `npm run init` obligatory.\n\n## \u003ca id=\"scripts\"\u003e\u003c/a\u003e The scripts in package.json\n\nThe more important scripts added into the package.json created by this generator are:\n\n- `\"init\"`: Runs the commands necessary to initialize the package, for example `init:husky`.\n- `\"documentation:create\"`: Creates documentation using readme-md-generator.\n- `\"format\"`: Checks the format using prettier.\n- `\"format:fix\"`: Fixes the format using prettier.\n- `\"format:build-stage\"` and `\"format:build-stage:fix\"`: similar to `\"format\"` and `\"format:fix\"`. They used when the `npm run build` is called.\n- `\"lint\"`: static code analysis using eslint.\n- `\"lint:fix\"`: Fixes the code using eslint.\n- `\"lint:build-stage\"` and `\"lint:build-stage:fix\"`: similar to `\"lint\"` and `\"lint:fix\"`. They are used when the `npm run build` is called.\n- `\"build:bundle\"`: Bundles the files into src folder using rollup. It is used when the `npm run build` is called.\n- `\"build:tsc\"`: Generates .d.ts files using the TypeScript compilator. It is used when the `npm run build` is called.\n- `\"build\"`: Generates the dist folder that contains the cjs folder (source code transpiled to es5), the esm folder (source code transpiled to es6), and types folder (it contains the declaration files).\n- `\"prepublishOnly\"`: Used before publishing your package using `npm publish`. Runs `npm run build`.\n- `\"test\"`: Runs the tests using jest.\n- `\"commitlint\"`: Runs commitlint. It is used into .husky/commit-msg file. It is called by the commit-msg hook. See [git hook](https://www.atlassian.com/git/tutorials/git-hooks#:~:text=The%20commit%2Dmsg%20hook%20is,file%20that%20contains%20the%20message.).\n- `\"lint-staged\"`: Runs lint-staged. It is used into .husky/pre-commit file. It is called by the pre-commit hook. See [git hook](https://www.atlassian.com/git/tutorials/git-hooks#:~:text=The%20commit%2Dmsg%20hook%20is,file%20that%20contains%20the%20message.).\n- `\"quality-check\"`: Runs `npm run format \u0026\u0026 npm run lint \u0026\u0026 npm run test`. It is used into .husky/pre-push file. It is called by the pre-push hook See [git hook](https://www.atlassian.com/git/tutorials/git-hooks#:~:text=The%20commit%2Dmsg%20hook%20is,file%20that%20contains%20the%20message.).\n\n## \u003ca id=\"know-yeoman\"\u003e\u003c/a\u003e Getting To Know Yeoman\n\n- Yeoman has a heart of gold.\n- Yeoman is a person with feelings and opinions, but is very easy to work with.\n- Yeoman can be too opinionated at times but is easily convinced not to be.\n- Feel free to [learn more about Yeoman](http://yeoman.io/).\n\n## \u003ca id=\"author\"\u003e\u003c/a\u003e Author\n\n👤 **Cristopher Jiménez**\n\n- Github: [@cristopher1](https://github.com/cristopher1)\n\n## \u003ca id=\"contributing\"\u003e\u003c/a\u003e 🤝 Contributing\n\nContributions, issues and feature requests are welcome!\u003cbr /\u003eFeel free to check [issues page](https://github.com/cristopher1/generator-quality-npm-package/issues).\n\n## \u003ca id=\"support\"\u003e\u003c/a\u003e Show your support\n\nGive a ⭐️ if this project helped you!\n\n## \u003ca id=\"license\"\u003e\u003c/a\u003e 📝 License\n\nCopyright © 2023 [Cristopher Jiménez](https://github.com/cristopher1).\u003cbr /\u003e\nThis project is [MIT](https://github.com/cristopher1/generator-quality-npm-package/blob/master/LICENSE) licensed.\n\n---\n\n_This README was generated with ❤️ by [readme-md-generator](https://github.com/kefranabg/readme-md-generator)_\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcristopher1%2Fgenerator-quality-npm-package","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcristopher1%2Fgenerator-quality-npm-package","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcristopher1%2Fgenerator-quality-npm-package/lists"}