{"id":20551383,"url":"https://github.com/generate/generate-collections","last_synced_at":"2025-07-11T14:38:29.002Z","repository":{"id":57158146,"uuid":"51719822","full_name":"generate/generate-collections","owner":"generate","description":"Add the docs, includes, badges, and layouts collections, along with a few generic defaults to your generator.","archived":false,"fork":false,"pushed_at":"2017-05-27T23:23:35.000Z","size":35,"stargazers_count":6,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-05-18T12:07:36.943Z","etag":null,"topics":["generator","project-template","scaffold","templates"],"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/generate.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":"2016-02-14T23:44:46.000Z","updated_at":"2022-04-28T23:49:08.000Z","dependencies_parsed_at":"2022-09-03T18:51:17.886Z","dependency_job_id":null,"html_url":"https://github.com/generate/generate-collections","commit_stats":null,"previous_names":[],"tags_count":14,"template":false,"template_full_name":null,"purl":"pkg:github/generate/generate-collections","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/generate%2Fgenerate-collections","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/generate%2Fgenerate-collections/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/generate%2Fgenerate-collections/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/generate%2Fgenerate-collections/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/generate","download_url":"https://codeload.github.com/generate/generate-collections/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/generate%2Fgenerate-collections/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":261352857,"owners_count":23146141,"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":["generator","project-template","scaffold","templates"],"created_at":"2024-11-16T02:30:20.452Z","updated_at":"2025-07-11T14:38:28.981Z","avatar_url":"https://github.com/generate.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# generate-collections [![NPM version](https://img.shields.io/npm/v/generate-collections.svg?style=flat)](https://www.npmjs.com/package/generate-collections) [![NPM monthly downloads](https://img.shields.io/npm/dm/generate-collections.svg?style=flat)](https://npmjs.org/package/generate-collections) [![NPM total downloads](https://img.shields.io/npm/dt/generate-collections.svg?style=flat)](https://npmjs.org/package/generate-collections) [![Linux Build Status](https://img.shields.io/travis/generate/generate-collections.svg?style=flat\u0026label=Travis)](https://travis-ci.org/generate/generate-collections)\n\n\u003e Initializes a handful of (empty) template collections to your generator, such as docs, includes, badges, and layouts, along with a few generic defaults.\n\nYou might also be interested in [generate-file](https://github.com/generate/generate-file).\n\n## Install\n\nInstall as a `devDependency` with [npm](https://www.npmjs.com/):\n\n```sh\n$ npm install --save-dev generate-collections\n```\n\n## Usage\n\nUse as a plugin, to initialize commonly used [view collections](#collections-created) (no views are actually added to the collections).\n\n```js\nmodule.exports = function(app) {\n  app.use(require('generate-collections'));\n  // do other generator stuff\n};\n```\n\n## Collections created\n\nAdds the following view collections to your generator:\n\n### Renderable\n\nTemplates for files intended to be written to the file system.\n\n* `files`\n\n**Example usage**\n\n```js\napp.files('templates/*.md');\n```\n\n### Layouts\n\nTemplates to be used as layouts (for \"wrapping\" other templates or content):\n\n* `layouts`\n\n```js\napp.layouts('templates/layouts/*.md');\n```\n\n### Partials\n\nTemplates to be used as partials (for injecting into other templates)\n\n* `includes`\n* `badges`\n* `docs`\n\n```js\napp.partials('templates/partials/*.md');\n```\n\n## Smart plugin\n\nThis generator follows [base](https://github.com/node-base/base) \"smart plugin\" conventions, so it can be used as a plugin with any of the following libraries:\n\n* [generate](https://github.com/generate/generate): in your local `generator.js` file or globally installed `generate` generator.\n* [assemble](https://github.com/assemble/assemble): in your local `assemblefile.js` file or globally installed `assemble` generator.\n* [update](https://github.com/update/update): in your local `updatefile.js` file or globally installed `update` generator.\n* [verb](https://github.com/verbose/verb): in your local `verbfile.js` file or globally installed `verb` generator.\n\n## About\n\n### Related projects\n\n* [generate-license](https://www.npmjs.com/package/generate-license): Generate a license file for a GitHub project. | [homepage](https://github.com/generate/generate-license \"Generate a license file for a GitHub project.\")\n* [generate-mocha](https://www.npmjs.com/package/generate-mocha): Generate mocha test files. | [homepage](https://github.com/generate/generate-mocha \"Generate mocha test files.\")\n* [generate-node](https://www.npmjs.com/package/generate-node): Generate a node.js project, with everything you need to begin writing code and easily publish… [more](https://github.com/generate/generate-node) | [homepage](https://github.com/generate/generate-node \"Generate a node.js project, with everything you need to begin writing code and easily publish the project to npm.\")\n\n### Contributing\n\nPull requests and stars are always welcome. For bugs and feature requests, [please create an issue](../../issues/new).\n\n### Building docs\n\n_(This project's readme.md is generated by [verb](https://github.com/verbose/verb-generate-readme), please don't edit the readme directly. Any changes to the readme must be made in the [.verb.md](.verb.md) readme template.)_\n\nTo generate the readme, run the following command:\n\n```sh\n$ npm install -g verbose/verb#dev verb-generate-readme \u0026\u0026 verb\n```\n\n### Running tests\n\nRunning and reviewing unit tests is a great way to get familiarized with a library and its API. You can install dependencies and run tests with the following command:\n\n```sh\n$ npm install \u0026\u0026 npm test\n```\n\n### Author\n\n**Jon Schlinkert**\n\n* [github/jonschlinkert](https://github.com/jonschlinkert)\n* [twitter/jonschlinkert](https://twitter.com/jonschlinkert)\n\n### License\n\nCopyright © 2017, [Jon Schlinkert](https://github.com/jonschlinkert).\nReleased under the [MIT License](LICENSE).\n\n***\n\n_This file was generated by [verb-generate-readme](https://github.com/verbose/verb-generate-readme), v0.6.0, on May 27, 2017._","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgenerate%2Fgenerate-collections","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fgenerate%2Fgenerate-collections","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgenerate%2Fgenerate-collections/lists"}