mirror of
https://github.com/Shopify/liquid.git
synced 2026-09-19 10:52:48 -07:00
Set up Grunt
Fixing up Grunt file to watch for directories Exclude node modules folder from Jekyll built site
This commit is contained in:
+34
@@ -0,0 +1,34 @@
|
||||
/*
|
||||
* grunt-contrib-concat
|
||||
* http://gruntjs.com/
|
||||
*
|
||||
* Copyright (c) 2013 "Cowboy" Ben Alman, contributors
|
||||
* Licensed under the MIT license.
|
||||
*/
|
||||
|
||||
'use strict';
|
||||
|
||||
exports.init = function(/*grunt*/) {
|
||||
var exports = {};
|
||||
|
||||
// Return the given source code with any leading banner comment stripped.
|
||||
exports.stripBanner = function(src, options) {
|
||||
if (!options) { options = {}; }
|
||||
var m = [];
|
||||
if (options.line) {
|
||||
// Strip // ... leading banners.
|
||||
m.push('(?:.*\\/\\/.*\\r?\\n)+\\s*');
|
||||
}
|
||||
if (options.block) {
|
||||
// Strips all /* ... */ block comment banners.
|
||||
m.push('\\/\\*[\\s\\S]*?\\*\\/');
|
||||
} else {
|
||||
// Strips only /* ... */ block comment banners, excluding /*! ... */.
|
||||
m.push('\\/\\*[^!][\\s\\S]*?\\*\\/');
|
||||
}
|
||||
var re = new RegExp('^\\s*(?:' + m.join('|') + ')\\s*', '');
|
||||
return src.replace(re, '');
|
||||
};
|
||||
|
||||
return exports;
|
||||
};
|
||||
Reference in New Issue
Block a user