Skip to content

spatie/blender-gulp

Repository files navigation

blender-gulp

Software License Code Climate

This is the gulp setup for Blender CMS.

Support us

We invest a lot of resources into creating best in class open source packages. You can support us by buying one of our paid products.

We highly appreciate you sending us a postcard from your hometown, mentioning which of our package(s) you are using. You'll find our address on our contact page. We publish all received postcards on our virtual postcard wall.

Install

Install gulp globally

$ npm install --global gulp

Install blender-gulp

This NPM package is custom built for Spatie projects and is therefore not registered on NPM.

We assume that you have Composer already installed for the php code style fixer.

We install it via a custom npm registry npm.spatie.be:

$ npm i blender-gulp --save-dev

Sample webpack.config.js

const webpack = require('webpack');

const config = require('blender-gulp/config/webpack');

config.entry = {
    'back.vendor': ['jquery'],
    'back.head': './js/back/head.js',
    'back.app': './js/back/app.js',
    'back.style': './sass/back/back.scss',
    'front.head': './js/front/head.js',
    'front.app': './js/front/app.js',
    'front.style': './sass/front/front.scss',
};

config.plugins.push(new webpack.optimize.CommonsChunkPlugin({
    name: 'back.vendor',
    chunks: ['back.head', 'back.app', 'back.editor', 'back.chart'],
    filename: 'back.vendor.js',
}));

config.plugins.push(new webpack.ProvidePlugin({
    $: 'jquery',
    jQuery: 'jquery',
}));

module.exports = config;

Usage

Run gulp help to see options

Change log

Please see CHANGELOG for more information what has changed recently.

Contributing

Please see CONTRIBUTING for details.

Security

If you discover any security related issues, please email willem@spatie.be instead of using the issue tracker.

Credits

About Spatie

Spatie is webdesign agency in Antwerp, Belgium. You'll find an overview of all our open source projects on our website.

License

The MIT License (MIT). Please see License File for more information.