Code Monkey home page Code Monkey logo

drupal-automated-testing's Introduction

Drupal project template

Get a working Drupal website locally in minutes with this fine-tuned template.

Based on the great Drupal Composer project.

Requirement

Install Lando on your machine.

Usage

git clone https://github.com/MatthieuScarset/drupal-template.git myproject

cd myproject

# Delete git reference.
rm -rf .git/

# Replace the project name (i.e. 'myproject').
code .env.example    # ->  DRUSH_OPTIONS_URI=https://myproject.lndo.site
code .lando.yml      # ->  name: myproject

# Create your env file now
cp .env.example .env

# Commit your changes
git init && git add . && git commit -m "Init project"

# Start the project
lando start

# Download dependencies
lando composer install -o

# Install Drupal
lando drush site:install --existing-config -y
lando drush user:password admin admin
lando drush user:login # -> Ctrl+Click the URL to open your site :)

Helpful commands:

# Get local environment info (e.g. your site's URL)
lando info

# Enter the app container to run commands.
lando ssh
|__ www-data@xxx:/app$ ./vendor/bin/drush cache-rebuild
|__ www-data@xxx:/app$ exit # or CTRL+D

# Common Drush commands
lando drush core-status # check current installation
lando drush cache-rebuild # clear caches
lando drush config-export # export config changes to codebase
lando drush config-import # import config changes to database
lando drush en mymodule # enable module(s)
lando drush php # interactive PHP CLI

# Composer commands.
lando composer code-fix # fix/format files with uncommitted changes...
lando composer code-fix -- web/themes/custom/project/ # ...or specify a folder
lando composer code-fix -- web/modules/custom/mymodule/mymodule.module # ...or a file
lando composer code-check # log coding standards issues
lando composer code-check -- themes/custom/mytheme # ...or specify a folder
lando composer code-check -- themes/custom/mytheme/README.md # ...or a file

Be eco-friendly, reduce your digital footprint before deployment.

# Delete unncessary files and test directories.
chmod +x scripts/drupal_thinner.sh
lando composer code-clean

drupal-automated-testing's People

Contributors

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