{"id":13852399,"url":"https://github.com/phase2/drupal-lab","last_synced_at":"2025-07-29T05:04:21.064Z","repository":{"id":55601921,"uuid":"58164857","full_name":"phase2/drupal-lab","owner":"phase2","description":"A sample Drupal 8 site with a Pattern Lab Twig powered theme.","archived":false,"fork":false,"pushed_at":"2017-06-02T19:23:33.000Z","size":1341,"stargazers_count":59,"open_issues_count":11,"forks_count":22,"subscribers_count":26,"default_branch":"master","last_synced_at":"2025-05-15T18:51:36.865Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"PHP","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/phase2.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-05-05T22:36:24.000Z","updated_at":"2025-02-07T07:18:31.000Z","dependencies_parsed_at":"2022-08-15T04:10:19.865Z","dependency_job_id":null,"html_url":"https://github.com/phase2/drupal-lab","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/phase2/drupal-lab","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/phase2%2Fdrupal-lab","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/phase2%2Fdrupal-lab/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/phase2%2Fdrupal-lab/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/phase2%2Fdrupal-lab/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/phase2","download_url":"https://codeload.github.com/phase2/drupal-lab/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/phase2%2Fdrupal-lab/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":267632858,"owners_count":24118748,"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","status":"online","status_checked_at":"2025-07-29T02:00:12.549Z","response_time":2574,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"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":[],"created_at":"2024-08-04T22:01:18.651Z","updated_at":"2025-07-29T05:04:21.042Z","avatar_url":"https://github.com/phase2.png","language":"PHP","readme":"[![Join the chat at https://gitter.im/pattern-lab/php](https://badges.gitter.im/pattern-lab/php.png)](https://gitter.im/pattern-lab/php) [![Docs](https://img.shields.io/badge/docs-master-brightgreen.svg?style=flat)](http://drupal-lab.readthedocs.io)\n\n# Drupal Lab\n\nA sample Drupal 8 site with a Pattern Lab Twig powered theme.\n\n**All commands starting with `bash` are run from root of repo; all that start with `drupal` are ran from `web/`**\n\n## Setup\n\n### Prerequisites\n\n- `composer` installed\n- node js installed - supported node versions: 0.12.x, 4.x, 5.x, and 6.x using npm 2.x or 3.x.\n\n### Site Install\n\n\t\tbash scripts/site-setup.sh\n\nWhen it asks if you want to merge or replace stuff, select merge.\n\n## Usage\n\n### Run Drupal \u0026 Pattern Lab Servers\n\nIn two Terminal tabs, run:\n\n1. Run `composer run server --timeout=0`\n1. Run `npm start` in `web/themes/dashing/`\n\n### Drupal Credentials\n\n- Username: `admin`\n- Password: `admin`\n\n### Rebuild\n\n\t\tbash scripts/site-reinstall.sh\n\n### Cache Rebuilds\n\n\t\t../vendor/bin/drupal cr all\n\n### Theme \u0026 Pattern Lab\n\nAll commands are run from root of theme in `web/themes/dashing/`. An `npm install` was ran in `site-setup.sh` script, run `npm install` if you don't see `node_modules/` or have errors.\n\nTo compile theme (CSS \u0026 Pattern Lab):\n\n\t\tnpm run compile\n\nTo execute watches on Scss and Pattern Lab along with a server for Pattern Lab, run:\n\n\t\tnpm start\n\n#### How to build your own\n\n##### Simple, pre-packaged Drupal Theme with Twig Pattern Lab \n\n\t\tdrush dl patternlab\n\nThat will download a Drupal Theme ready to go: [GitHub repo](https://github.com/phase2/pattern-lab-drupal-theme) ~ [Drupal.org project page](https://www.drupal.org/project/patternlab).\n\n##### Custom configured Drupal Theme with Twig Pattern Lab\n\nHere's a collection of the tools used to build this site; go make something cool with them!\n\n- [Pattern Lab 2.0 - Drupal Edition](https://github.com/pattern-lab/edition-php-drupal-standard) - this collection of tools super charges what could be done with Pattern Lab 1.0 and is made up of these pieces:\n\t- [Twig Engine for Pattern Lab](https://github.com/pattern-lab/patternengine-php-twig) - instead of the traditional Mustache engine in Pattern Lab 1.0, this uses Twig, which is much more powerfule, and is template language in Drupal 8!\n\t- [Drupal Twig Components plugin](https://github.com/pattern-lab/plugin-drupal-twig-components) - this adds extra functionality to Pattern Lab's Twig Engine, and let's use the essential `link` \u0026 `trans` Twig Functions; among many more!\n\t- [Data Transform plugin](https://github.com/aleksip/plugin-data-transform) - this super charges the JSON/YAML Pattern Sidecar data files to effectively let you pre-process data before rendering Twig templates. Incredibly powerful \u0026 flexible. Made by the awesome [Aleksi Peebles](http://www.aleksip.net).\n\nThe above tools give us a Twig powered, Drupal-aware Pattern Lab and can be spun up with:\n\t\n\t\tcomposer create-project pattern-lab/edition-drupal-standard\n\nWe've made a Drupal theme called [Pattern Lab Starter](https://github.com/phase2/pattern-lab-starter) that integrates the above Pattern Lab Drupal Edition along with [Gulp tasks](https://github.com/phase2/p2-theme-core) for common theme needs. \n\n## Configuration\n\nAfter making changes, run `../vendor/bin/drupal config:export -y` and commit the files. If you just pulled or are deploying, run `../vendor/bin/drupal config:import -y` to pull configuration changes present in the yaml files in `web/sites/default/config/sync/` into the database. Very similar to Features in Drupal 7.\n\n## Install Drupal Modules\n\nTo install a new Drupal module, run this:\n\n    composer require drupal/MODULE_NAME:8.*\n\nAfter enabling, do a `../vendor/bin/drupal config:export -y`.\n\n## Who's behind this?\n\nBuilt with love at [Phase2](https://phase2technology.com) by [Evan Lovely](https://twitter.com/EvanLovely), [Anne Sturdivant](https://twitter.com/anniegreens), and [Chris Bloom](https://twitter.com/illepic). Most of the work to make this possible happened over at the [Pattern Lab GitHub org](https://github.com/pattern-lab) with collaboration from [Dave Olsen](https://twitter.com/dmolsen) \u0026 [Aleksi Peebles](https://twitter.com/aleksip). Special thanks to Kellye Rogers and Frank Febbraro for supporting this internal project and wanting to share it with the community!\n","funding_links":[],"categories":["PHP"],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fphase2%2Fdrupal-lab","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fphase2%2Fdrupal-lab","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fphase2%2Fdrupal-lab/lists"}