{"id":20467030,"url":"https://github.com/codekraft-studio/generator-wordpress-theme","last_synced_at":"2025-04-13T09:11:00.521Z","repository":{"id":57249418,"uuid":"79590172","full_name":"codekraft-studio/generator-wordpress-theme","owner":"codekraft-studio","description":":rocket: Yeoman generator for WordPress themes, childs and custom templates","archived":false,"fork":false,"pushed_at":"2019-01-22T08:27:54.000Z","size":927,"stargazers_count":6,"open_issues_count":2,"forks_count":4,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-03-27T00:54:13.930Z","etag":null,"topics":["wordpress","wordpress-plugin","wordpress-theme","yeoman","yeoman-generator"],"latest_commit_sha":null,"homepage":"https://codekraft-studio.github.io/generator-wordpress-theme/","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/codekraft-studio.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":"2017-01-20T19:22:40.000Z","updated_at":"2023-12-07T16:55:35.000Z","dependencies_parsed_at":"2022-08-26T12:33:12.826Z","dependency_job_id":null,"html_url":"https://github.com/codekraft-studio/generator-wordpress-theme","commit_stats":null,"previous_names":["codekraft-studio/generator-wordpress-starter"],"tags_count":2,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/codekraft-studio%2Fgenerator-wordpress-theme","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/codekraft-studio%2Fgenerator-wordpress-theme/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/codekraft-studio%2Fgenerator-wordpress-theme/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/codekraft-studio%2Fgenerator-wordpress-theme/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/codekraft-studio","download_url":"https://codeload.github.com/codekraft-studio/generator-wordpress-theme/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248688565,"owners_count":21145766,"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":["wordpress","wordpress-plugin","wordpress-theme","yeoman","yeoman-generator"],"created_at":"2024-11-15T13:26:49.381Z","updated_at":"2025-04-13T09:11:00.496Z","avatar_url":"https://github.com/codekraft-studio.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"![banner](banner.jpg)\n\n[![NPM version][npm-image]][npm-url] [![Build Status][travis-image]][travis-url] [![Dependency Status][daviddm-image]][daviddm-url] [![Coverage percentage][coveralls-image]][coveralls-url] [![Slack Chat](https://img.shields.io/badge/wordpress_slack-@codekraft--studio-blue.svg?style=flat)](https://wordpress.slack.com)\n\n# generator-wordpress-theme\n\n\u003e Yeoman generator for WordPress themes, childs and custom templates\n\n## Installation\n\nFirst, install [Yeoman](http://yeoman.io) and __generator-wordpress-theme__ using [npm](https://www.npmjs.com/) (we assume you have pre-installed [node.js](https://nodejs.org/)).\n\n```bash\nnpm install -g yo @wptools/generator-theme\n```\n\nTo generate a new project just type the string below, the generator will create the folder for you if not exists:\n\n```bash\nyo @wptools/theme \"My Theme\"\nyo @wptools/theme:child \"My Child Theme\"\n```\n\nIt will ask few questions then it will setup a new project for your in seconds.\n\n---\n\n## Creating a custom template\n\nThe generator allows you to generate WordPress themes from custom templates located in \t`~/.wptools/themes` folder, so you don't have to write a generator by yourself.\n\n+ Create the `.wptools/themes` directory on your profile home `mkdir -p ~/.wptools/themes`.\n+ Place your custom theme templates inside that folder to make them accessible in the generator execution.\n+ When your template is ready you can use it with `--template TemplateName` or choose it from the prompt question options.\n\nYou **must create** the folder if doesn't exist and place your themes inside like in this example:\n\n```bash\ntree ~/.wptools/themes/\n├───Simple\n└───Advanced\n```\n\nEvery theme folder __must follow__ simple rules in order to been generated correctly.\n\n```bash\ntree ~/.wptools/themes/Simple\n└───theme\n```\n\nIn this example the Simple theme has only the __theme__ directory where you should put all the theme files like in the [default theme](https://github.com/codekraft-studio/generator-wordpress-theme/tree/master/generators/app/templates/theme) that comes with the generator.\n\nOptionally you can also generate more complex projects, that uses build systems, to archive this result you __must follow this project directory structure__:\n\n```bash\ntree ~/.wptools/themes/Simple\n├───grunt\n├───gulp\n├───webpack\n└───theme\n```\n\nThe generator will search for your project manager template files inside the folder named like it, take a look on how the [default theme](https://github.com/codekraft-studio/generator-wordpress-theme/tree/master/generators/app/templates) handle multiple setups.\n\nInside your custom templates you have access to variables during the rendering process, here the list of all the variables used and available right now during rendering:\n\n* __projectName__: The project name as slug\n* __projectTitle__: The full project title as it appears on WordPress repositories\n* __projectDescription__: A short project description\n* __projectTemplate__: The name of the template that is being used\n* __projectManager__: The name of the selected build system\n* __projectVersion__: The version when the project has started\n* __projectAuthor__: The project author name\n* __projectLicense__: The project license name\n\nAnd only for the child theme generator, all the above plus:\n\n* __parentTemplate__: The name of the parent template theme\n\nSimply use it like this: `\u003c%= projectName %\u003e` inside your files to have it rendered with the value, if you are not familiar with it take a loot at [EJS interpolation](http://www.embeddedjs.com/).\n\nInside the __theme__ folder you will always put all the themes related files (scripts, templates, assets, ...) while in the other folders you should put only the files that are related with your project build system configuration and package dependencies.\n\n\n---\n\n## Development\n\nTo develop this package you must clone it with Git and than link it to your global npm modules by typing:\n\n```bash\nnpm link\n```\n\nThan you can start editing the package by following the contribuing guidelines below and than testing with: `yo @wptools/theme`, if you have any troubles please follow [this](http://yeoman.io/authoring/) guide, \"__Running the generator__\".\n\n---\n\n## Contributing\n\n1. Create an issue and describe your idea\n2. Fork the project (https://github.com/codekraft-studio/generator-wordpress-theme/fork)\n3. Create your feature branch (`git checkout -b my-new-feature`)\n4. Commit your changes (`git commit -am 'Add some feature'`)\n5. Publish the branch (`git push origin my-new-feature`)\n6. Add some test for your new feature\n7. Create a new Pull Request\n\n---\n\n## 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## License\n\nApache-2.0 © [codekraft-studio]()\n\n[npm-image]: https://badge.fury.io/js/%40wptools%2Fgenerator-theme.svg\n[npm-url]: https://npmjs.org/package/@wptools/generator-theme\n[travis-image]: https://travis-ci.org/codekraft-studio/generator-wordpress-theme.svg?branch=master\n[travis-url]: https://travis-ci.org/codekraft-studio/generator-wordpress-theme\n[daviddm-image]: https://david-dm.org/codekraft-studio/generator-wordpress-theme.svg?theme=shields.io\n[daviddm-url]: https://david-dm.org/codekraft-studio/generator-wordpress-theme\n[coveralls-image]: https://coveralls.io/repos/codekraft-studio/generator-wordpress-theme/badge.svg\n[coveralls-url]: https://coveralls.io/r/codekraft-studio/generator-wordpress-theme\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcodekraft-studio%2Fgenerator-wordpress-theme","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcodekraft-studio%2Fgenerator-wordpress-theme","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcodekraft-studio%2Fgenerator-wordpress-theme/lists"}