{"id":18802661,"url":"https://github.com/drupalcommerce/demo-project","last_synced_at":"2025-04-07T13:07:58.486Z","repository":{"id":29979867,"uuid":"123384775","full_name":"drupalcommerce/demo-project","owner":"drupalcommerce","description":"Provides a Composer template for a new Commerce 2.x project with demo content","archived":false,"fork":false,"pushed_at":"2023-01-28T20:03:01.000Z","size":1789,"stargazers_count":74,"open_issues_count":8,"forks_count":39,"subscribers_count":11,"default_branch":"master","last_synced_at":"2025-03-31T11:06:43.087Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","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/drupalcommerce.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":"2018-03-01T05:04:38.000Z","updated_at":"2024-11-14T09:34:25.000Z","dependencies_parsed_at":"2023-02-15T18:35:51.355Z","dependency_job_id":null,"html_url":"https://github.com/drupalcommerce/demo-project","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/drupalcommerce%2Fdemo-project","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/drupalcommerce%2Fdemo-project/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/drupalcommerce%2Fdemo-project/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/drupalcommerce%2Fdemo-project/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/drupalcommerce","download_url":"https://codeload.github.com/drupalcommerce/demo-project/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247657281,"owners_count":20974345,"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":[],"created_at":"2024-11-07T22:29:52.339Z","updated_at":"2025-04-07T13:07:58.469Z","avatar_url":"https://github.com/drupalcommerce.png","language":"PHP","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Commerce 2.x demo project template\n\nUse [Composer](https://getcomposer.org/) to get Drupal + Commerce 2.x + demo content.\n\nBased on [drupalcommerce/project-base](https://github.com/drupalcommerce/project-base), plus\na [custom theme](https://drupal.org/project/belgrade) and [demo content](https://drupal.org/project/commerce_demo).\n\n![Belgrade product example](assets/belgrade-product.jpg)\n\n## Usage\n\nFirst you need to [install composer](https://getcomposer.org/doc/00-intro.md#installation-linux-unix-osx).\n\n\u003e Note: The instructions below refer to the [global composer installation](https://getcomposer.org/doc/00-intro.md#globally).\nYou might need to replace `composer` with `php composer.phar` (or similar)\nfor your setup.\n\nAfter that you can create the project:\n\n```\ncomposer create-project drupalcommerce/demo-project demo-commerce --stability dev --no-interaction\n```\n\nDone! Use `composer require ...` to download additional modules and themes:\n\n```\ncd some-dir\ncomposer require \"drupal/devel:1.x-dev\"\n```\n\nThe `composer create-project` command passes ownership of all files to the\nproject that is created. You should create a new git repository, and commit\nall files not excluded by the .gitignore file.\n\n## Quickstart\n\nAfter the files are in place, go to install.php to install Drupal.\n\nAlternatively, you can use the quickstart script:\n\n```\nphp scripts/quickstart\n```\n\nTo reinstall:\n\n```\nphp scripts/clean\nphp scripts/quickstart\n```\n\n## What does the template do?\n\n* Drupal is installed in the `web` directory.\n* Modules (packages of type `drupal-module`) are placed in `web/modules/contrib/`\n* Theme (packages of type `drupal-theme`) are placed in `web/themes/contrib/`\n* Profiles (packages of type `drupal-profile`) are placed in `web/profiles/contrib/`\n* Creates default writable versions of `settings.php` and `services.yml`.\n* Creates the `web/sites/default/files` directory.\n* Latest version of DrupalConsole is installed locally for use at `bin/drupal`.\n\n## Updating Drupal Core\n\nThis project will attempt to keep all of your Drupal Core files up-to-date; the\nproject [drupal/core-composer-scaffold](https://github.com/drupal/core-composer-scaffold)\nis used to ensure that your scaffold files are updated every time drupal/core is\nupdated. If you customize any of the \"scaffolding\" files (commonly .htaccess),\nyou may need to merge conflicts if any of your modified files are updated in a\nnew release of Drupal core.\n\nFollow the steps below to update your core files.\n\n1. Run `composer update drupal/core drupal/core-dev --with-dependencies` to update Drupal Core and its dependencies.\n2. Run `git diff` to determine if any of the scaffolding files have changed.\n   Review the files for any changes and restore any customizations to\n  `.htaccess` or `robots.txt`.\n1. Commit everything all together in a single commit, so `web` will remain in\n   sync with the `core` when checking out branches or running `git bisect`.\n1. In the event that there are non-trivial conflicts in step 2, you may wish\n   to perform these steps on a branch, and use `git merge` to combine the\n   updated core files with your customized files. This facilitates the use\n   of a [three-way merge tool such as kdiff3](http://www.gitshah.com/2010/12/how-to-setup-kdiff-as-diff-tool-for-git.html). This setup is not necessary if your changes are simple;\n   keeping all of your modifications at the beginning or end of the file is a\n   good strategy to keep merges easy.\n\n## Generate composer.json from existing project\n\nWith using [the \"Composer Generate\" drush extension](https://www.drupal.org/project/composer_generate)\nyou can now generate a basic `composer.json` file from an existing project. Note\nthat the generated `composer.json` might differ from this project's file.\n\n## FAQ\n\n### Should I commit the contrib modules I download?\n\nComposer recommends **no**. They provide [argumentation against but also\nworkrounds if a project decides to do it anyway](https://getcomposer.org/doc/faqs/should-i-commit-the-dependencies-in-my-vendor-directory.md).\n\n### Should I commit the scaffolding files?\n\nThe [Drupal Composer Scaffold](https://github.com/drupal/core-composer-scaffold) plugin can download the scaffold files (like\nindex.php, update.php, …) to the web/ directory of your project. If you have not customized those files you could choose\nto not check them into your version control system (e.g. git). If that is the case for your project it might be\nconvenient to automatically run the drupal-scaffold plugin after every install or update of your project. You can\nachieve that by registering `@composer drupal:scaffold` as post-install and post-update command in your composer.json:\n\n```json\n\"scripts\": {\n    \"post-install-cmd\": [\n        \"@composer drupal:scaffold\",\n        \"...\"\n    ],\n    \"post-update-cmd\": [\n        \"@composer drupal:scaffold\",\n        \"...\"\n    ]\n},\n```\n### How can I apply patches to downloaded modules?\n\nIf you need to apply patches (depending on the project being modified, a pull\nrequest is often a better solution), you can do so with the\n[composer-patches](https://github.com/cweagans/composer-patches) plugin.\n\nTo add a patch to drupal module foobar insert the patches section in the extra\nsection of composer.json:\n```json\n\"extra\": {\n    \"patches\": {\n        \"drupal/foobar\": {\n            \"Patch description\": \"URL to patch\"\n        }\n    }\n}\n```\n\n### How can I add js/css libraries using composer.json?\n\nIt is possible to use frontend libraries with composer thanks to the\nasset-packagist repository (https://asset-packagist.org/).\n\nFor example, to use colorbox:\n```\ncomposer require npm-asset/colorbox:\"^0.4\"\n\n```\nComposer will detect new versions of the library that meet your constraints.\nIn the above example it will download anything from 0.4.* series of colorbox.\n\nWhen managing libraries with composer this way, you may not want to add it to\nversion control. In that case, add specific directories to the .gitignore file.\n```\n# Specific libraries (which we manage with composer)\nweb/libraries/colorbox\n```\n\nFor more details, see https://asset-packagist.org/site/about\n\n### How do I specify a PHP version ?\n\nThis project supports PHP 7.1 as minimum version (see [Drupal 8 PHP requirements](https://www.drupal.org/docs/8/system-requirements/drupal-8-php-requirements)), however it's possible that a `composer update` will upgrade some package that will then require PHP 7+.\n\nTo prevent this you can add this code to specify the PHP version you want to use in the `config` section of `composer.json`:\n```json\n\"config\": {\n    \"sort-packages\": true,\n    \"platform\": {\n        \"php\": \"7.1\"\n    }\n},\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdrupalcommerce%2Fdemo-project","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdrupalcommerce%2Fdemo-project","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdrupalcommerce%2Fdemo-project/lists"}