All Projects → hussainweb → drupal-composer-init

hussainweb / drupal-composer-init

Licence: MIT license
Initialise a Drupal composer setup

Programming Languages

PHP
23972 projects - #3 most used programming language

Projects that are alternatives of or similar to drupal-composer-init

drupal8-vagrant
Simple Drupal 8 Development Environment
Stars: ✭ 59 (+37.21%)
Mutual labels:  drupal, drupal-7, drupal-8
docker-drupal
Docker scaffolding for Drupal 8
Stars: ✭ 41 (-4.65%)
Mutual labels:  drupal, drupal-8
varbase
Built using Drupal 8/9, an enterprise website builder platform that combines powerful editorial features, mobile, lead-generation, SEO, social media integration, and beautiful bespoke designs. Varbase is packed with adaptive functionalities and essential modules.
Stars: ✭ 75 (+74.42%)
Mutual labels:  drupal, drupal-8
DrupalDriver
A collection of drivers for controlling Drupal.
Stars: ✭ 64 (+48.84%)
Mutual labels:  drupal, drupal-8
shila-drupal-theme
Atomic design and Pattern Lab friendly, component-based, fairly unopinionated starting point for new Drupal themes
Stars: ✭ 81 (+88.37%)
Mutual labels:  drupal, drupal-8
migrate source example
Example module for Drupal 8 that provides migrations of users, terms, files and nodes from database, JSON resources, CSV and XML files. #migrate
Stars: ✭ 39 (-9.3%)
Mutual labels:  drupal, drupal-8
Drupal Component Scaffold
Scaffolding Composer plugin for Drupal modules and themes.
Stars: ✭ 11 (-74.42%)
Mutual labels:  drupal, composer-plugin
DrupalTwigFood
Useful functions, filters for twig @ Drupal 8
Stars: ✭ 1 (-97.67%)
Mutual labels:  drupal, drupal-8
dkan2
Deprecated: please use the 2.x branch of the dkan repo
Stars: ✭ 17 (-60.47%)
Mutual labels:  drupal, drupal-8
apigee-api-catalog-drupal
Manage your API catalog within Drupal's content management approach
Stars: ✭ 17 (-60.47%)
Mutual labels:  drupal, drupal-8
drupal-circleci-behat
Test and deploy Drupal 9 with CircleCI 2.0 and Behat 3
Stars: ✭ 17 (-60.47%)
Mutual labels:  drupal, drupal-8
drupal-jsonapi-params
A package to manage json-api params
Stars: ✭ 42 (-2.33%)
Mutual labels:  drupal, drupal-8
drupal8-composer-template
Project template for Drupal 8 projects with composer | Quick installation via "composer create-project woprrr/drupal8-composer-template:8.3.0"
Stars: ✭ 27 (-37.21%)
Mutual labels:  drupal, drupal-8
drupal8-employee-crud-module
No description or website provided.
Stars: ✭ 16 (-62.79%)
Mutual labels:  drupal, drupal-8
distros.bid
A saas to create drupal websites in seconds using docker containers.
Stars: ✭ 16 (-62.79%)
Mutual labels:  drupal, drupal-8
datos.gob.es
Código perteneciente al portal español de Datos Abiertos datos.gob.es.
Stars: ✭ 20 (-53.49%)
Mutual labels:  drupal, drupal-7
fractal-twig-drupal-adapter
Twig template adapter for Fractal with Drupal 8 directives.
Stars: ✭ 13 (-69.77%)
Mutual labels:  drupal, drupal-8
apigee-devportal-kickstart-drupal
A fast demo and starting point for Apigee Developer Portals for Drupal
Stars: ✭ 21 (-51.16%)
Mutual labels:  drupal, drupal-8
drupal-react-image-gallery
Drupal 8 module that provides a dynamic Image Gallery based on the react-image-gallery component.
Stars: ✭ 13 (-69.77%)
Mutual labels:  drupal, drupal-8
Beetbox
Pre-provisioned L*MP stack
Stars: ✭ 94 (+118.6%)
Mutual labels:  drupal, composer-plugin

drupal-composer-init

Latest Version Software License Build Status Total Downloads

This 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.

This plugin also supports Drupal 7 installation but this option needs to be passed in from command line.

The composer.json setup that this plugin generates is inspired by 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. There are additional benefits like a simpler extra section and a more maintainable installation. For more details, see the drupal-composer-helper plugin.

Installation

Since 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.

composer global require hussainweb/drupal-composer-init:~1.0

Updating

composer global update hussainweb/drupal-composer-init --with-dependencies

Usage

In a fresh directory, run this command to get started.

composer drupal-init

To intialise a Drupal 7 website, run the following command:

composer drupal-init --drupal-7

Specifying extensions (modules, themes, profiles)

Drupal extensions such as modules, themes, and profiles can be specified in the regular require or require-dev section of composer.json schema.

All 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.

Define your dependencies.

Would you like to define your dependencies (require) now [yes]?
Search for a package: drupal/panels
Enter the version constraint to require (or leave blank to use the latest version):
Using version ^4.2 for drupal/panels
Search for a package: drupal/redirect
Enter the version constraint to require (or leave blank to use the latest version):
Using version ^1.0@beta for drupal/redirect
Search for a package:

Additional Help

Run composer help drupal-init for more options.

Usage:
  drupal-init [options]

Options:
      --name=NAME                Name of the package
      --description=DESCRIPTION  Description of package
      --author=AUTHOR            Author name of package
      --type[=TYPE]              Type of package (e.g. library, project, metapackage, composer-plugin) [default: "project"]
      --homepage=HOMEPAGE        Homepage of package
      --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)
      --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)
  -c, --core=CORE                Drupal Core or distribution, e.g. drupal/core or acquia/lightning [default: "drupal/core"]
  -s, --stability=STABILITY      Minimum stability (empty or one of: stable, RC, beta, alpha, dev)
  -l, --license=LICENSE          License of package
      --repository=REPOSITORY    Add custom repositories, either by URL or using JSON arrays (multiple values allowed)
  -w, --web-dir=WEB-DIR          Specify the docroot (defaults to web) [default: "web"]
      --drupal-7                 Use Drupal 7 packagist instead of Drupal 8
  -h, --help                     Display this help message
  -q, --quiet                    Do not output any message
  -V, --version                  Display this application version
      --ansi                     Force ANSI output
      --no-ansi                  Disable ANSI output
  -n, --no-interaction           Do not ask any interactive question
      --profile                  Display timing and memory usage information
      --no-plugins               Whether to disable plugins.
  -d, --working-dir=WORKING-DIR  If specified, use the given directory as working directory.
  -v|vv|vvv, --verbose           Increase the verbosity of messages: 1 for normal output, 2 for more verbose output and 3 for debug

Help:
  The drupal-init command creates a composer.json file
  usable for Drupal projects in the current directory.

  php composer.phar drupal-init

Contributing

Contributions are welcome. Please use the issue queue to describe the problem. Pull requests are welcome.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].