{"id":19305164,"url":"https://github.com/hussainweb/drupal-composer-init","last_synced_at":"2025-04-22T12:34:39.460Z","repository":{"id":56987209,"uuid":"106824769","full_name":"hussainweb/drupal-composer-init","owner":"hussainweb","description":"Initialise a Drupal composer setup","archived":false,"fork":false,"pushed_at":"2018-01-05T14:32:29.000Z","size":25,"stargazers_count":43,"open_issues_count":4,"forks_count":5,"subscribers_count":6,"default_branch":"master","last_synced_at":"2024-04-09T16:35:14.725Z","etag":null,"topics":["composer","composer-plugin","drupal","drupal-7","drupal-8","drupal-setups"],"latest_commit_sha":null,"homepage":null,"language":"PHP","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/hussainweb.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-10-13T13:00:43.000Z","updated_at":"2024-04-09T16:35:14.726Z","dependencies_parsed_at":"2022-08-21T13:20:13.525Z","dependency_job_id":null,"html_url":"https://github.com/hussainweb/drupal-composer-init","commit_stats":null,"previous_names":[],"tags_count":4,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hussainweb%2Fdrupal-composer-init","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hussainweb%2Fdrupal-composer-init/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hussainweb%2Fdrupal-composer-init/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hussainweb%2Fdrupal-composer-init/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/hussainweb","download_url":"https://codeload.github.com/hussainweb/drupal-composer-init/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":223896879,"owners_count":17221459,"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":["composer","composer-plugin","drupal","drupal-7","drupal-8","drupal-setups"],"created_at":"2024-11-09T23:35:12.236Z","updated_at":"2024-11-09T23:35:12.749Z","avatar_url":"https://github.com/hussainweb.png","language":"PHP","funding_links":[],"categories":[],"sub_categories":[],"readme":"# drupal-composer-init\n\n[![Latest Version](https://img.shields.io/github/release/hussainweb/drupal-composer-init.svg?style=flat-square)](https://github.com/hussainweb/drupal-composer-init/releases)\n[![Software License](https://img.shields.io/badge/license-MIT-brightgreen.svg?style=flat-square)](LICENSE.md)\n[![Build Status](https://img.shields.io/travis/hussainweb/drupal-composer-init/master.svg?style=flat-square)](https://travis-ci.org/hussainweb/drupal-composer-init)\n[![Total Downloads](https://img.shields.io/packagist/dt/hussainweb/drupal-composer-init.svg?style=flat-square)](https://packagist.org/packages/hussainweb/drupal-composer-init)\n\nThis plugin provides a new composer command (`drupal-init`) which helps in creating new Drupal installations based on composer. Most of the options are very similar to the default `composer init` command. There are additional options to specify a Drupal core or distro to use and the docroot.\n\nThis plugin also supports Drupal 7 installation but this option needs to be passed in from command line.\n\nThe composer.json setup that this plugin generates is inspired by [drupal-composer/drupal-project](https://github.com/drupal-composer/drupal-project) (both D7 and D8 versions). One important difference is that the composer.json generated by this command does not need several scripts which are part of the drupal-composer project. All the functionality is moved to [hussainweb/drupal-composer-helper](https://github.com/hussainweb/drupal-composer-helper). There are additional benefits like a simpler `extra` section and a more maintainable installation. For more details, see the [drupal-composer-helper](https://github.com/hussainweb/drupal-composer-helper) plugin.\n\n## Installation\n\nSince this plugin provides a new composer command that should be used in an empty directory (or at least a directory without a composer.json setup), this has to be installed globally.\n\n```\ncomposer global require hussainweb/drupal-composer-init:~1.0\n```\n\n## Updating\n\n```\ncomposer global update hussainweb/drupal-composer-init --with-dependencies\n```\n\n## Usage\n\nIn a fresh directory, run this command to get started.\n\n```\ncomposer drupal-init\n```\n\nTo intialise a Drupal 7 website, run the following command:\n\n```\ncomposer drupal-init --drupal-7\n```\n\n### Specifying extensions (modules, themes, profiles)\n\nDrupal extensions such as modules, themes, and profiles can be specified in the regular `require` or `require-dev` section of composer.json schema.\n\nAll Drupal extensions can be specified in the regular packages section with their drupal.org name prefixed by '`drupal/`'. For example, if you want to require panels module, specify `drupal/panels`.\n\n```\nDefine your dependencies.\n\nWould you like to define your dependencies (require) now [yes]?\nSearch for a package: drupal/panels\nEnter the version constraint to require (or leave blank to use the latest version):\nUsing version ^4.2 for drupal/panels\nSearch for a package: drupal/redirect\nEnter the version constraint to require (or leave blank to use the latest version):\nUsing version ^1.0@beta for drupal/redirect\nSearch for a package:\n```\n\n### Additional Help\n\nRun `composer help drupal-init` for more options.\n\n```\nUsage:\n  drupal-init [options]\n\nOptions:\n      --name=NAME                Name of the package\n      --description=DESCRIPTION  Description of package\n      --author=AUTHOR            Author name of package\n      --type[=TYPE]              Type of package (e.g. library, project, metapackage, composer-plugin) [default: \"project\"]\n      --homepage=HOMEPAGE        Homepage of package\n      --require=REQUIRE          Package to require with a version constraint, e.g. foo/bar:1.0.0 or foo/bar=1.0.0 or \"foo/bar 1.0.0\" (multiple values allowed)\n      --require-dev=REQUIRE-DEV  Package to require for development with a version constraint, e.g. foo/bar:1.0.0 or foo/bar=1.0.0 or \"foo/bar 1.0.0\" (multiple values allowed)\n  -c, --core=CORE                Drupal Core or distribution, e.g. drupal/core or acquia/lightning [default: \"drupal/core\"]\n  -s, --stability=STABILITY      Minimum stability (empty or one of: stable, RC, beta, alpha, dev)\n  -l, --license=LICENSE          License of package\n      --repository=REPOSITORY    Add custom repositories, either by URL or using JSON arrays (multiple values allowed)\n  -w, --web-dir=WEB-DIR          Specify the docroot (defaults to web) [default: \"web\"]\n      --drupal-7                 Use Drupal 7 packagist instead of Drupal 8\n  -h, --help                     Display this help message\n  -q, --quiet                    Do not output any message\n  -V, --version                  Display this application version\n      --ansi                     Force ANSI output\n      --no-ansi                  Disable ANSI output\n  -n, --no-interaction           Do not ask any interactive question\n      --profile                  Display timing and memory usage information\n      --no-plugins               Whether to disable plugins.\n  -d, --working-dir=WORKING-DIR  If specified, use the given directory as working directory.\n  -v|vv|vvv, --verbose           Increase the verbosity of messages: 1 for normal output, 2 for more verbose output and 3 for debug\n\nHelp:\n  The drupal-init command creates a composer.json file\n  usable for Drupal projects in the current directory.\n\n  php composer.phar drupal-init\n```\n\n## Contributing\n\nContributions are welcome. Please use the issue queue to describe the problem. Pull requests are welcome.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhussainweb%2Fdrupal-composer-init","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fhussainweb%2Fdrupal-composer-init","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhussainweb%2Fdrupal-composer-init/lists"}