mirror of
https://github.com/open-policy-agent/opa.git
synced 2026-08-22 16:24:48 -06:00
fa9ae9437c
The gitbook install has been incredibly flaky due to it's dependency on npm. This commit simply vendors the node_modules so that each time we build the site the process doesn't have to re-run gitbook install. Signed-off-by: Torin Sandall <torinsandall@gmail.com>
30 lines
697 B
JavaScript
30 lines
697 B
JavaScript
'use strict';
|
|
|
|
var parsers = require('../parsers');
|
|
|
|
var parse = function parse(v) {
|
|
var parsed = parsers.parseUrl(v);
|
|
if (parsed !== undefined) {
|
|
return parsed;
|
|
}
|
|
if (parsers.valueType(v) === parsers.TYPES.KEYWORD && (v.toLowerCase() === 'none' || v.toLowerCase() === 'inherit')) {
|
|
return v;
|
|
}
|
|
return undefined;
|
|
};
|
|
|
|
module.exports.isValid = function isValid(v) {
|
|
return parse(v) !== undefined;
|
|
};
|
|
|
|
module.exports.definition = {
|
|
set: function (v) {
|
|
this._setProperty('background-image', parse(v));
|
|
},
|
|
get: function () {
|
|
return this.getPropertyValue('background-image');
|
|
},
|
|
enumerable: true,
|
|
configurable: true
|
|
};
|