A starter kit for Drupal Development

Project screenshot in NPM

Open source is the foundation for a lot of the stuff that we nowadays know (including Drupal). There are a lot of really cool open source projects and one of the greatest goodness of OSS is that you could create tools based on some of those great projects; that’s how we, at Manati, brought to life MDSK: based on drupalvm, aquifer, gulp, composer, eslint, phplint and a lot of other amazing web development tools.

Manati Drupal Starter Kit allows you to scaffold a Drupal site and keep its code as cleanest as possible: no Drupal contrib code will live in your repo, your code is always going to be standards-compliant and you’ll have a behat and wrecker configuration out of the box; so you can forget of setting the bored stuff and focus doing what you’re great at: creating amazing Drupal sites. Although the M stands for Manatí, you could forget it for a while and start thinking on it like Marvelous.

I know the above paragraphs sound like a nice sales pitch, but, why would I want to use this new tool? The only way to answer this is to analyze the advantages of some of the tools included in the package.

Vagrant

Having our development environment setup with Vagrant allows all developers to share the same environment and ideally it should be as similar as possible to the live environment. Having this, we could avoid the typical "it works in my machine" pain and keep things moving forward.

DrupalVM

We don't want to reinvent the wheel, there's a well documented and well maintained project based on vagrant and ansible named drupalvm that give the developers a virtual machine fully ready for drupal development. This is an awesome project by Jeff Geerling that speeds up drupal development a lot.

Gulp

We include a couple of predefined gulp tasks and you could create your own tasks to fit your needs. The ones that we include are:

  • drupalcs: To verify Drupal Coding Standards
  • phplint: To lint php code and ensure there are php syntax errors
  • eslint: To ensure our js code is standards compliant.
  • Any other suggestion is more than welcome.

Behat

A behavioral testing framework ready to use by a simple script located in scripts folder. There's also a predefined config that you can adjust to your needs and start writing your tests.

Wraith

A tool for visual regression testing that it's ready to use in your project. It maybe won't be so useful at project kickstart; but it could be really useful for when you launch the initial version of your site. You just need to setup the base (live) and actual (dev) sites and a set of urls (or to use the crawler that comes with the tool) and it will work as expected. See README.md on generated project to get more details.

Custom Scripts

There are also some custom scripts in order to make your life easier:

  • Local Install: To install your drupal site
  • Local Settings: To generate the local settings files
  • Behat: To run behat tests
  • Features Test: To verify that all features are in default state
  • Updates Test: To ensure there are no update available to any project.

Wercker

At Manatí we use Wercker for continous integration and Pantheon for development/hosting, so; we have set up a wercker configuration to make this integration seamlessly and to ensure all our code is in good shape. We think it's a good option and it actually fits our needs. If you think we should include any other CI Platform, we'd love to hear your thoughts.

We started this as an internal tool (hence the name), but then, we discovered this can be used by any people/company around, so, we want to let the world know it exists and if some people use it a give some feedback that would be awesome for us. We'd love to see some comments, issues and PRs. You can download and start using it right now by going to our NPM page.

TL;DR

At Manati we built a project scaffolding tool based on some cool tools that we think can be useful for your projects; it's named MDSK and you can download it from https://www.npmjs.com/package/generator-mdsk We hope you can take a look to it and leave any comment/issue/Pull Request in order to keep the improvement going.

Some useful links:

Drupal, DevOps, Backend, PHP...