mimosa-copy
Version:
A generic copy 'compiler' for Mimosa
22 lines (17 loc) • 704 B
JavaScript
;
exports.defaults = function() {
return {
copy: {
extensions: ["js","css","png","jpg","jpeg","gif","html","php","eot","svg","ttf","woff","woff2","otf","yaml","kml","ico","htc","htm","json","txt","xml","xsd","map","md","mp4","mp3","swf","apng","mng","phtml","volt","gz"],
exclude: []
}
};
};
exports.validate = function(config, validators) {
var errors = [];
if ( validators.ifExistsIsObject( errors, "copy config", config.copy) ) {
validators.isArrayOfStrings( errors, "copy.extensions", config.copy.extensions );
validators.ifExistsFileExcludeWithRegexAndString( errors, "copy.exclude", config.copy, config.watch.sourceDir );
}
return errors;
};