pixsy/node_modules/less/lib/less-browser/image-size.js

29 lines
750 B
JavaScript
Raw Normal View History

2017-12-22 17:22:08 +00:00
module.exports = function() {
var functionRegistry = require("./../less/functions/function-registry");
function imageSize() {
throw {
type: "Runtime",
message: "Image size functions are not supported in browser version of less"
};
}
var imageFunctions = {
"image-size": function(filePathNode) {
imageSize(this, filePathNode);
return -1;
},
"image-width": function(filePathNode) {
imageSize(this, filePathNode);
return -1;
},
"image-height": function(filePathNode) {
imageSize(this, filePathNode);
return -1;
}
};
functionRegistry.addMultiple(imageFunctions);
};