riddlestone/brokkr-gulpfile

A tool to create gulpfiles based on Laminas module configuration

v2.2.0 2020-04-09 22:46 UTC

This package is auto-updated.

Last update: 2022-04-29 01:17:48 UTC


README

A Laminas module for creating Gulp config files

Installation

Installation of this module uses composer. For composer documentation, please refer to getcomposer.org.

composer require riddlestone/brokkr-gulpfile

Usage

To include your js/sass files in the gulpfile, add them in portals to your module or site's config file:

<?php
return [
    'portals' => [
        'main' => [
            'css' => [
                realpath(__DIR__ . '/../resources/css/**/*.scss'),
            ],
            'js' => [
                realpath(__DIR__ . '/../resources/js/**/*.js'),
            ],
        ],
    ],
];

Note: Any other methods which brokkr-portals uses to provide portal information can also be used to get information to brokkr-gulpfile.

A gulpfile can now be created using the brokkr command gulpfile:

vendor/bin/brokkr gulpfile

Setting SASS options

To set SASS options, include them in the sass_options settings for your portal:

<?php
return [
    'portals' => [
        'main' => [
            'css' => [
                realpath(__DIR__ . '/../resources/css/**/*.scss'),
            ],
            'sass_options' => [
                'includePaths' => [
                    'vendor/someones/awesome-css-stuff/scss',
                ],
            ],
        ],
    ],
];

Changing the template

To change the template for your gulpfile, just copy view/gulpfile.js.php somewhere, change it, and add the new path to your module/site's config:

<?php
return [
    'gulp' => [
        'template' => realpath(__DIR__ . '/../view/gulpfile.js.php'),
    ],
];

Changing the target path

To change the path of the final gulpfile, just add the following to your site/module's config:

<?php
return [
    'gulp' => [
        'target' => 'gulpfile2.js',
    ],
];

Get Involved

File issues at https://github.com/riddlestone/brokkr-gulpfile/issues