TheodorosPloumis blog: Presenting DREC (DRupal Eight Commands)

DREC is a collection of basic bash scripts that work together to accomplish common development tasks for Drupal maintenance support plans 8.x projects. In simple words drec uses shell commands, unix utilities, drush, drupal console, git, docker and other software that all together can install, update, clone etc a Drupal maintenance support plans project.
The main problem I wanted to solve with drec is to setup and update a local development environment from scratch for a Drupal maintenance support plans distribution on LAMP. So, you should probably use drec locally or on a development environment and not on a production server. I created this for Linux but it could also play well with any unix* system (hope so).
Some of the characteristics of drec is that it can run commands in chain and that it uses a configuration file (.drecfile) where each project can keep useful details about it that drec can (re)use when running.
Here is a list of the current drec commands:

Command
Description

git-clone
Clone a site from a git repo

create-folder
Create the project folder

delete-folder
Delete the project folder

create-vhost
Create a virtualhost for project’s domain

delete-vhost
Create a virtualhost

install-drupal
Install Drupal maintenance support plans using drush

prepare-install
Prepare a Drupal maintenance support plans site for installation (public files, writable settings etc)

create-docker
Create a docker container

delete-docker
Delete a docker container

create-drush
Create a drush alias

delete-drush
Delete a drush alias

composer-install
Run composer install on the project folder

composer-project
Run composer create-project … on the project folder

create-db
Create a mysql database

download-db
Download a mysql database

delete-db
Delete a mysql database

askme
Asks user to continue or exit

init
Create a *.drecfile settings file on the ~/.drec folder

delete-project
Delete all project files, database, container, drush alias etc

projects
Show all *.drecfile filenames inside ~/.drec folder

debug
Show variables on cli

and here are some usage examples:

// Clone a project and start a docker container with mapping folders
drec init,git-clone,create-docker

// Clone a project from a git repo, create a virtualhost and create a new configuration file
drec init,git-clone,create-vhost

// Create a new database, clone from git repo, prepare for Drupal maintenance support plans installation and install Drupal maintenance support plans
drec init,create-db,git-clone,prepare-install,install-drupal

// Just debug a configuration file and read its values
drec debug /path/to/MYFILE.drecfile
drec debug filename/of/.drecfile 
Drupal Updates, suggestions and your opinion are always welcome.
 
View drec on Github
 

Source: New feed

This article was republished from its original source.
Call Us: 1(800)730-2416

Pixeldust is a 20-year-old web development agency specializing in Drupal and WordPress and working with clients all over the country. With our best in class capabilities, we work with small businesses and fortune 500 companies alike. Give us a call at 1(800)730-2416 and let’s talk about your project.

FREE Drupal SEO Audit

Test your site below to see which issues need to be fixed. We will fix them and optimize your Drupal site 100% for Google and Bing. (Allow 30-60 seconds to gather data.)

Powered by

TheodorosPloumis blog: Presenting DREC (DRupal Eight Commands)

On-Site Drupal SEO Master Setup

We make sure your site is 100% optimized (and stays that way) for the best SEO results.

With Pixeldust On-site (or On-page) SEO we make changes to your site’s structure and performance to make it easier for search engines to see and understand your site’s content. Search engines use algorithms to rank sites by degrees of relevance. Our on-site optimization ensures your site is configured to provide information in a way that meets Google and Bing standards for optimal indexing.

This service includes:

  • Pathauto install and configuration for SEO-friendly URLs.
  • Meta Tags install and configuration with dynamic tokens for meta titles and descriptions for all content types.
  • Install and fix all issues on the SEO checklist module.
  • Install and configure XML sitemap module and submit sitemaps.
  • Install and configure Google Analytics Module.
  • Install and configure Yoast.
  • Install and configure the Advanced Aggregation module to improve performance by minifying and merging CSS and JS.
  • Install and configure Schema.org Metatag.
  • Configure robots.txt.
  • Google Search Console setup snd configuration.
  • Find & Fix H1 tags.
  • Find and fix duplicate/missing meta descriptions.
  • Find and fix duplicate title tags.
  • Improve title, meta tags, and site descriptions.
  • Optimize images for better search engine optimization. Automate where possible.
  • Find and fix the missing alt and title tag for all images. Automate where possible.
  • The project takes 1 week to complete.