Gulp Drupal Tasks
This library provides a set of common Gulp tasks for working with PHP/Drupal. The goals are:
- Provide a single point of management for updating the Gulp tasks across all of LCM's Drupal builds.
- Have excellent test coverage to make sure everything (still) works.
- Reduce the install time and speed up the Gulp boot process by providing lighter weight alternatives to heavier Gulp plugins.
- Install this package using NPM
- Create a gulpfile that looks similar to this:var gulp = ;var Registry = ;var config = ;// Register common tasks. Use `gulp --tasks` to get a current list.gulp;// Set the default task.gulp;
- Create a
Upgrading from 2.0.0:
To update from 2.0, simply update your
gulpfile.js to the above snippet.
Important changes from 2.x:
- Just running
gulpno longer gives you a nicely formatted task list - it now executes the
build:watchcommand by default. To get a task list, use
gulp --tasksto get a listing.
Guidelines for development:
- Tasks should be small and composable.
- All tasks should be asynchronous to take advantage of Gulp parallelization.
- All tasks should fail predictably (no plugin failures that don't also fail the build).
- Task configuration should be explicitly checked as quickly as possible.
- Don't put slow calls into the critical path. Gulp boot should be as fast as possible. Delay slow requires or file existence checks until the task is actually executed.
Publishing on NPM
When you are ready to release a new version, run
npm version X.X.X. This will update the version in package.json, and create a new tagged commit. Just push it to github using
git push origin master --follow-tags, and CircleCI will deploy it to NPM.