overcoming command line allergies

Post on 21-Jan-2017

311 Views

Category:

Technology

0 Downloads

Preview:

Click to see full reader

TRANSCRIPT

Overcoming Command Line Allergies

Elaine Nelson v elainenelson.org

Caveats

What I want you to learn

Who am I?

WHY IS IT SO HARD?

Cooking vs. Baking

WHY SHOULD I BOTHER?

Drush = Speed

Features + Git = Better Drupaling

The land of the “real” programmers

FIND YOUR COMFORT ZONE

IT’S DANGEROUS TO GO ALONE! TAKE THIS…

Navigation

dir or ls cd

Make it a little nicer•  clear (Mac only) •  Different styles •  Bigger type

Vim, nano, or whatever

The Googles•  That XKCD flowchart

https://xkcd.com/627/

The first time you try stuff, it might be terrible.

SAMPLE PROJECT

THIS IS THE PART WHERE WE CARGO CULT

Set up a web server!MAMP + command line https://www.mamp.info/ http://bramvandenbulcke.be/en/article/installing-drush-mamp

Acquia Dev Desktop https://www.acquia.com/products-services/dev-desktop

SAVE YOUR HANDS WITH DRUSH

(Re)Installing Drupal

drush site-install

Is this thing on?

drush status

Module installation: the old way

Module installation

drush en module_name

Always say YES

drush en module_name --y

Advanced module tricks

drush dl project_name drush en module_name-7.x-x.x

Updates

drush up

drush cc all

How to go further•  Beginner’s guide

https://www.digitalocean.com/community/tutorials/a-beginner-s-guide-to-drush-the-drupal-shell

•  Full list of commands http://drushcommands.com/

•  Drupalize Me https://drupalize.me/videos/what-drush?p=1156

A FEATURE IS A WHAT NOW?

Naming things is hard•  Features is a module. •  A feature is something made with

Features. •  A feature is also itself a module.

The simplest way to create a setup of content types, views, and other stuff.

Install Features

drush en features --y

Building your feature

Putting your Feature to work

drush en feature_name --y

How to go farther•  Drush commands to use with Features:

https://www.drupal.org/node/960926

•  Migrate works with Features •  Drupalize Me (no, they’re not paying me)

GIT IS YOUR SAFETY NET

like Dropbox, but for Features

Again on the live

Adding changes

Needs  drush  fu  screenshot?  

Stage > Commit > Push

Rolling back

Fetch > Pull > Revert

Tools for GitGUIs for Git•  Cross-platform, free: Github & Sourcetree •  My preference: Tower (Mac only, $69)

Remote origin options•  Github •  Bitbucket •  Gitlab

Add complexity as you need it•  Rolling back, branching, merging •  Git for Teams

Emma Jane Hogbin Westby http://shop.oreilly.com/product/0636920034520.do

ALLERGY RELIEF

top related