Coder Social home page Coder Social logo

example-pipelines's Introduction

This is a Composer-based installer for the Lightning Drupal distribution. Welcome to the future!

Get Started

You will need the following installed:

  • Composer, obviously
  • Node, which includes the NPM package manager

When you have those, run this command:

$ composer create-project acquia/lightning-project MY_PROJECT

Composer will create a new directory called MY_PROJECT containing a docroot directory with a full Lightning code base therein. You can then install it like you would any other Drupal site.

Maintenance

drush make, drush pm-download, drush pm-update and their ilk are the old-school way of maintaining your code base. Forget them. You're in Composer land now!

Let this handy table be your guide:

Task Drush Composer
Installing a contrib project (latest version) drush pm-download PROJECT composer require drupal/PROJECT
Installing a contrib project (specific version) drush pm-download PROJECT-8.x-1.0-beta3 composer require drupal/PROJECT:1.0.0-beta3
Updating all contrib projects and Drupal core drush pm-update composer update
Updating a single contrib project drush pm-update PROJECT composer update drupal/PROJECT
Updating Drupal core drush pm-update drupal composer update drupal/core

The magic is that Composer, unlike Drush, is a dependency manager. If module foo version: 1.0.0 depends on baz version: 3.2.0, Composer will not let you update baz to 3.3.0 (or downgrade it to 3.1.0, for that matter). Drush has no concept of dependency management. If you've ever accidentally hosed a site because of dependency issues like this, you've probably already realized how valuable Composer can be.

But to be clear: you still need Drush. Tasks such as database updates (drush updatedb) are still firmly in Drush's province, and it's awesome at that stuff. This installer will install a copy of Drush (local to the project) in the bin directory.

Specifying a version

you can specify a version from the command line with:

$ composer require drupal/<modulename>:<version> 

For example:

$ composer require drupal/ctools:3.0.0-alpha26
$ composer require drupal/token:1.x-dev 

In these examples, the composer version 3.0.0-alpha26 maps to the drupal.org version 8.x-3.0-alpha26 and 1.x-dev maps to 8.x-1.x branch on drupal.org.

If you specify a branch, such as 1.x you must add -dev to the end of the version.

Composer is only responsible for maintaining the code base.

Source Control

If you peek at the .gitignore we provide, you'll see that certain directories, including all directories containing contributed projects, are excluded from source control. This might be a bit disconcerting if you're newly arrived from Planet Drush, but in a Composer-based project like this one, you SHOULD NOT commit your installed dependencies to source control.

When you set up the project, Composer will create a file called composer.lock, which is a list of which dependencies were installed, and in which versions. Commit composer.lock to source control! Then, when your colleagues want to spin up their own copies of the project, all they'll have to do is run composer install, which will install the correct versions of everything in composer.lock.

example-pipelines's People

Contributors

cam8001 avatar bjaspan avatar gollyg avatar

Watchers

 avatar  avatar James Cloos avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.