Download the PHP package makinacorpus/drupal-gulpifier without Composer

On this page you can find all versions of the php package makinacorpus/drupal-gulpifier. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package drupal-gulpifier

Gulpifier module

by Makina Corpus

This module ease the use of Gulp as a frontend automation tool for Drupal. It aims to provide a clean structure to work with JS and CSS files, as well as images, sprites and iconfonts.

This README is for interested themers, this is an advanced module for advanced themers that are looking to bring Gulp to their already existing Drupal development cycle.

Philosophy

The module allows to respect current front-end performance tips:

Overall it is all about network waterfall optimisation to display content under the 1000ms barrier on mobile. This obviously a goal, and it depends on many external factors (your server configuration, network latency, use of CDN, ...)

Principles

Drupal is already doing a good job for small sites:

But we lack some manual override to, for example:

Install

Apply this core patch https://www.drupal.org/node/2329453#comment-9470115 This prevent from having segmentation faults when clearing caches (due to malformed .info files in node_modules)

How it works

All settings for gulpifier are relative to a theme, so you can use it on any theme, may it be front-end or back-end, or multiple themes at once.

Most settings can be set in the interface trhough the theme settings form, but we recommend to st them in your theme's .info file so that they are tracked in your VCS. These are always prefixed by settings[gulpifier_...]

Firstly, to enable gulpifier for a theme, use settings[gulpifier_enabled] = 1 in your theme info file, or trough the checkbox of your theme settings form.

Single JS bundle

A map.json file is populated on each page visit to construct a potential list of JS files, that will be later minified and compressed by Gulp. JS files provided by core, modules, or theme are going to this generated map, it can be manually modified to blacklist any file that you don't want to go in the bundle, or to change the order of the files within the bundle. A good example of JS file to blacklist is token.js, there will rearely be a time when your anonymous visitors will access the Token dialog, although it may have been picked by the discovery process. You can set it in the info file with settings[gulpifier_discover]. The path to the map.json file is by default in yourtheme/js/map.json but you can override it in your theme info file with settings[gulpifier_map_path].

Whitelist

There is also a whitelist of JS files, that Gulpifier won't process, they won't go into map.json and will be added on the page as Drupal does otherwise. A good example for this whitelist is admin_menu.js, it needs to be present when you are logged in, but there is not point to have it in the bundle, nor to put it in the blacklist. This whitelist is defined in the .info file of your theme:

settings[gulpifier_whitelist][js][] = "admin_menu:admin_menu.js"

You can see that there is a special notation "module_name:internal_path" that can be used, it's more human-readable and doesn't care about subdirectories that these modules may be in. If you wish, you can also use absolute path, still relative to the DRUPAL_ROOT:

settings[gulpifier_whitelist][js][] = "sites/all/modules/admin_menu/admin_menu.js"

As soon as you modify this whitelist, don't forget to flush your theme registry.

Blacklist

In case you don't want some JS files either in the map.json nor in any pages, put them in the js_blacklist as such:

settings[gulpifier_js_blacklist][] = "toolbar:toolbar.js"

You can activate the single JS bundle in the info file with settings[gulpifier_single_js].

Single CSS bundle

All CSS are by default removed from the front-end, core and modules. This allows you to start fresh from a Framework like bootstrap without worrying about other files.

There is a whitelist of CSS files, that Gulpifier won't touch, they won't go into map.json and will be added on the page as Drupal does otherwise. A good example for this whitelist is jquery.ui theme, it needs to be present when you are visinting a page with a widget, but there is not point to have in the bundle, if this widget is only on one page of your site. This whitelist is defined in the .info file of your theme:

settings[gulpifier_whitelist][css][] = "admin_menu:admin_menu.js"

You can see that there is a special notation "module_name:internal_path" that can be used, it's more human-readable and doesn't care about subdirectories that these modules may be in. If you wish, you can also use absolute path, still relative to the DRUPAL_ROOT, that also works for base themes:

settings[gulpifier_whitelist][css][] = "sites/all/themes/rubik/views-admin.rubik.css"

As soon as you modify this whitelist, don't forget to flush your theme registry.

You can activate the single CSS bundle in the info file with settings[gulpifier_single_js].

Other settings

Most of the paths are overridable, e.g.: the map.json, the bundles but you must change them also in the generated gulpfile.js.

Same scope/group

This setting is available for both JS and CSS and allow all remaining files that would not be in the bundle to be aggregated in a single remaining file

No cache buster

Some gulp modules or browser refreshing features won't work with the cache busting parameter (?abcdef) that is added to the assets. It is totally optional and gulpifier does not require it at all. But you can learn more here:

Discovery killswitch

In production, you may want to disable the JS discovery to prevent creation/modification of JSON maps, regardless of theme settings. To do so, add this line to your settings.php file:

$conf['gulpifier_discovery_killswitch'] = TRUE;


All versions of drupal-gulpifier with dependencies

PHP Build Version
Package Version
No informations.
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package makinacorpus/drupal-gulpifier contains the following files

Loading the files please wait ....