{"id":20028600,"url":"https://github.com/phase2/generator-outrigger-drupal","last_synced_at":"2025-05-05T03:32:16.704Z","repository":{"id":57248273,"uuid":"93078369","full_name":"phase2/generator-outrigger-drupal","owner":"phase2","description":"Yeoman generator that weaves together Outrigger with other best-in-class tools for your Drupal project.","archived":false,"fork":false,"pushed_at":"2019-11-09T07:14:25.000Z","size":662,"stargazers_count":5,"open_issues_count":27,"forks_count":7,"subscribers_count":6,"default_branch":"master","last_synced_at":"2025-04-25T20:23:23.492Z","etag":null,"topics":["docker","drupal","generator","outrigger","yeoman"],"latest_commit_sha":null,"homepage":"http://outrigger.sh","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/phase2.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE.txt","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2017-06-01T16:37:09.000Z","updated_at":"2025-02-07T07:18:02.000Z","dependencies_parsed_at":"2022-08-24T16:31:33.177Z","dependency_job_id":null,"html_url":"https://github.com/phase2/generator-outrigger-drupal","commit_stats":null,"previous_names":[],"tags_count":19,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/phase2%2Fgenerator-outrigger-drupal","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/phase2%2Fgenerator-outrigger-drupal/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/phase2%2Fgenerator-outrigger-drupal/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/phase2%2Fgenerator-outrigger-drupal/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/phase2","download_url":"https://codeload.github.com/phase2/generator-outrigger-drupal/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":252435171,"owners_count":21747356,"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":["docker","drupal","generator","outrigger","yeoman"],"created_at":"2024-11-13T09:15:39.341Z","updated_at":"2025-05-05T03:32:16.347Z","avatar_url":"https://github.com/phase2.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Outrigger Drupal\n\n\u003e Yeoman generator that weaves together Outrigger with other best-in-class tools for your Drupal project.\n\n[![npm version](https://badge.fury.io/js/generator-outrigger-drupal.svg)](https://www.npmjs.com/package/generator-outrigger-drupal)\n[![Travis CI status](https://travis-ci.org/phase2/generator-outrigger-drupal.png?branch=master)](https://travis-ci.org/phase2/generator-outrigger-drupal)\n[![Greenkeeper badge](https://badges.greenkeeper.io/phase2/generator-outrigger-drupal.svg)](https://greenkeeper.io/)\n\n**The Outrigger Cloud sub-generator is still tied to Phase2's internal Docker hosting solution. The next version will be more open.**\n\nThis project helps create new Drupal projects fully outfitted with environment\nsupport, build processes, frontend tooling, and more. It operates as an umbrella [Yeoman](http://yeoman.io/) generator that asks questions,\nthen passes the answers to multiple \"child\" generators that handle their own\naspect of project scaffolding. As the name implies, this generator focuses on\nOutrigger practices, where some of the other generators in use are focused on\nbroader industry best practices.\n\n## Installation \u0026 Usage\n\n### Using Docker Image\n\n```\nmkdir ~/PROJECT-NAME\ncd ~/PROJECT-NAME\ndocker run -it --rm -v $PWD:/generated outrigger/generator\n```\n\nFor more options check out [outrigger/generator directly](https://github.com/phase2/outrigger-generator).\n\n### Using Docker for Development\n\nDocker-based usage is available as of v3.0.0. It is the recommended approach as\nupdates tend to be less prone to complication.\n\n```bash\ngit clone git@github.com:phase2/generator-outrigger-drupal.git\ncd generator-outrigger-drupal\ngit checkout v4.0.0\ndocker-compose run --rm cli npm install\nmkdir ~/path/to/empty/directory\nYO_PROJECT_DIRECTORY=~/path/to/empty/directory docker-compose run --rm yo outrigger-drupal\n```\n\n### Using npm\n\n```bash\nnpm install -g generator-outrigger-drupal\nmkdir ~/path/to/empty/directory\ncd ~/path/to/empty/directory\nyo outrigger-drupal\n```\n\n### Command-line Options\n\n* **`--replay`**: Re-run the generator against an existing project, using previously\nentered answers.\n* **`--use-master`**: Will make a point of leveraging the master version of\ngrunt-drupal-tasks.\n* **`--skip-install`**: Will skip running `npm install` at the end of the\ngeneration process. (Applied by default when you opt-in for the\nDocker-based Outrigger Environment.)\n\n## Answering Yeoman Prompts\n\n### First-time Usage\n\nOnce Yeoman has been started, you will be prompted to answer six to a dozen\nquestions about your project. These questions are used by the generator to\nselect templates, create variables for use in the templates, and further execute\nany code or customizations on top of the templated scaffolding.\n\n\u003e ***Please read the output at the end of the generator run, it has instructions\non next steps.***\n\n### Running on a Generated Project\n\nWhen you use this to generate a project, all your answers are recorded by Yeoman\nin a .yo-rc.json file at the root of your repository. As long as you commit this\nto the codebase, from then if you run the generator targeting that directory it\nwill use the previous answers as the defaults to every prompt. For even faster\nusage, you can run `yo outrigger-drupal --replay` and it will automatically run\nthe generator without stopping to ask old questions.\n\nIf you run the generator, it will overwrite files. That's the idea in this case,\nas your goal is to cherrypick good new stuff the generator provides into your\nproject. Run `git add -p .` to view each change one chunk at a time, and decide\nif it makes sense to discard or keep. Feel free to ask for help.\n\nThe extensive [CHANGELOG](./CHANGELOG.md) notes are intended to help guide this process.\n\n### Retrofitting an Existing Project\n\nIf you have an existing project and want to retrofit it to use the scaffolding\nand tools this generator provides, there is no magical solution.\n\n1. Create a new empty project, answer the prompts to align as closely as\npossible with your current projects practices and the goals you have in using\nthe generator.\n2. Copy all the pieces of your codebase into the new structure, including your\n.git directory.\n3. Adjust your scripts to the new structure, and adjust the generated\nconfiguration and scripts to the parts of your codebase that are not changing.\n\n## Next Steps\n\nRead the generated TODOS.md file. Remove things as you work through mastering\nand running your vanilla Drupal system for the first time.\n\nIf you are not using the Docker-based development environment, you can get your\ncodebase built by running `grunt`. From there you are on your own.\n\nIf you are using the Docker-based development environment, run `rig project setup`\nand your codebase will be built and a new site installed.\n\n## Child Generators\n\n### Backend Build Process, Testing, \u0026 Task Runner\n\n[Grunt Drupal Tasks](https://github.com/phase2/grunt-drupal-tasks) manages backend\ndevelopment, continuous integration, and overall project tooling for the Drupal\napplication.\n\nA best practice setup of GDT with a few extra goodies are provided by\nYo Outrigger Drupal's use of [Generator Gadget](https://github.com/phase2/generator-gadget)\nto produce the top-level Drupal application scaffolding.\n\n### Component-driven Frontend\n\n[Pattern Lab Starter]([Pattern Lab Starter](http://git.io/p2pls)) is used to\nprovide an optional Drupal theme with Pattern Lab for collaborative,\ndesign-driven development.\n\nThis is set up by [Generator PLS](https://github.com/phase2/generator-pattern-lab-starter).\n\nGrunt Drupal Tasks manages theme compilation via the [Theme Scripts of GDT](https://phase2.github.io/grunt-drupal-tasks/30_FRONTEND/)\nso a full site compile can happen by running the project's default build task: `grunt`.\n\n### Docker-based Development Environment\n\nWe integrate with Outrigger (now http://outrigger.sh) to provide a quick,\nconsistent, container-based, local development environment that can also be used\non Phase2's centralized Outrigger hosting to provide integration, testing, and\nother environments.\n\nThis uses a sub-generator of generator-outrigger-drupal which can be separately executed as `yo outrigger-drupal:environment`.\n\n#### Feature Breakdown\n\n* `docker-compose.yml` which provides Docker configuration for the \"operational\"\nservices needed to run your Drupal site locally.\n    * Default support for Apache and MariaDB containers, with optional support\n    for Redis or Memcache, Varnish, and Mailhog\n    * Supports Outrigger's DNSDock-based DNS service for nice URLs.\n    * Supports nginx-proxy for Outrigger Hosting nice URLs.\n* `build.yml` which provides tailored use of the Outrigger Build container.\n    * Persists command-line history on a per project/per environment basis.\n    * Persists build tool cache for Drush, Behat/Gherkin, Drupal Console, npm,\n    composer, yarn, bower, fontconfig, and any other tool which uses ~/.cache.\n    * Defines easy-access use of grunt, drush, drupal console, and composer.\n    * Defines a \"CLI\" service to open a standing BASH session with the build\n    container.\n* Default settings.php configuration that sets up Drupal environment\nconfiguration the \"Docker way\" to work out-of-the-box.\n* Default Drush configuration for slim database exports and a nice project alias.\n* Use Grunt Drupal Tasks via Docker, using minor configuration adjustments.\n* Provides a range of shell scripts to run builds, verify aspects of the system,\ncreate default users, and more.\n\n### Outrigger Cloud: Project-specific CI \u0026 Environment Management\n\nIf you liked the Docker-based environments, you can also use our Docker-based\nJenkins instance to manage your central test environments, complete with default\njobs so you can start continuous integration with zero further configuration.\n\nThis uses a sub-generator of generator-outrigger-drupal which can be separately\nexecuted as `yo outrigger-drupal:cloud`.\n\n### Feature Breakdown\n\n* Jenkins 1.x CI server pre-configured with various jobs:\n    * CI job polling your git repo to run tests.\n    * \"dev-support\" job to produce nightly database dumps of a fresh site install.\n    * Optional Environment lifecycle management jobs for Development, QA, and Review\n    environments, including: start/stop containers, deploy code, reset admin user password\n    * Test jobs to confirm the system is working.\n* Workspace details persisted in volume mounts inside repo:jenkins/env/workspace.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fphase2%2Fgenerator-outrigger-drupal","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fphase2%2Fgenerator-outrigger-drupal","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fphase2%2Fgenerator-outrigger-drupal/lists"}