This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
module.exports = function(grunt) { | |
// Load grunt tasks automatically | |
require('load-grunt-tasks')(grunt); | |
// Time how long tasks take. Can help when optimizing build times | |
require('time-grunt')(grunt); | |
// Project configuration. | |
grunt.initConfig({ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
grunt.registerTask ( "cambe", "cambe routines handler", function ( action, type, name, variation ) { | |
function getFileList(type, name, variation) { | |
var cleanType, cleanName, cleanVariation, folder, file, | |
fileList = [], | |
cambe_valids = ["context","area","module","block","element"], | |
cambe_ext = ["php", "js", "scss"], | |
regex = "/[`~!@#£$%^&*()_|+\\-=÷¿?;:'\",.<>\\{\\}\\[\\]\\\\\\/]+/gi"; | |
cleanName = ( typeof name === "string" ) ? name.replace ( regex, "_" ) : null; | |
cleanType = ( typeof type === "string" ) ? type.replace ( regex, "_" ) : null; |