Skip to content

Instantly share code, notes, and snippets.

@wolfgangschoeffel
wolfgangschoeffel / Gruntfile.js
Last active March 13, 2016 14:51
How to use grunt-usemin and grunt-rev when the html file (template) is in a subdirectory but the references should be relative to the root (index.php in the root directory that uses the template).
'use strict';
var lrSnippet = require('grunt-contrib-livereload/lib/utils').livereloadSnippet;
var mountFolder = function (connect, dir) {
return connect.static(require('path').resolve(dir));
};
// # Globbing
// for performance reasons we're only matching one level down:
// 'test/spec/{,*/}*.js'
// use this if you want to match all subfolders: