Skip to content

Instantly share code, notes, and snippets.

View ben-eb's full-sized avatar
🏠
Working from home

Ben Briggs ben-eb

🏠
Working from home
View GitHub Profile
@ben-eb
ben-eb / in.css
Created June 10, 2016 14:56
PostCSS CLI & cssnano example
h1 {
display: flex;
}
@ben-eb
ben-eb / test.js
Last active August 29, 2015 13:57
Test for gulp clone.
var expect = require('chai').expect,
through = require('through2'),
gutil = require('gulp-util'),
clone = require('./');
describe('gulp-clone', function() {
it('should clone files in the stream', function(done) {
var sourceStream = clone(),
cloneStream = clone();
@ben-eb
ben-eb / Gruntfile.js
Created October 19, 2013 10:26
Grunt file exists task. In the current implementation it only returns true.
// In this example, 'README' does not exist (it is named 'README.md')
module.exports = function(grunt) {
grunt.initConfig({
fileexists: {
test: {
src: ['test.html', 'README', 'package.json']
}
}
});
@ben-eb
ben-eb / Gruntfile.js
Created September 4, 2013 20:53
Split up the Gruntfile initConfig into individual JS files; this gist shows an example based on grunt-contrib-clean. This blog post has a more in-depth look at splitting up the Gruntfile into manageable chunks: http://www.thomasboyt.com/2013/09/01/maintainable-grunt.html
module.exports = function(grunt) {
var conf = {
pkg: grunt.file.readJSON('package.json')
};
grunt.file.recurse('./.grunt/config', function(a, r, s, f) {
conf[f.replace(/\.js$/, '')] = require('./' + a);
});