Skip to content

Instantly share code, notes, and snippets.

@mwinche
Created August 4, 2014 03:04
Show Gist options
  • Save mwinche/9234cb89624a43947312 to your computer and use it in GitHub Desktop.
Save mwinche/9234cb89624a43947312 to your computer and use it in GitHub Desktop.
Idea I was playing with for using Gulp plugins to compile and serve assets on the fly
#!/usr/bin/env node
var less = require('gulp-less'),
express = require('express'),
gulp = require('gulp');
var app = express();
app.get('/test.css', function(req, res){
gulp.src('test.less')
.pipe(less())
.on('data', function(data){
data.pipe(res);
});
});
app.listen(3000);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment