mirror of
https://github.com/google/pebble.git
synced 2025-03-15 08:41:21 +00:00
third_party: Fixup destinations for devsite assets
The destination field isn't meant to contain the destination filename - only the destination directory. Some files also had incorrect paths, and have been corrected. One file required a rename between moves (cookies.js -> cookies.min.js). A copy of the file was created with the new name, and the source updated to point at it.
This commit is contained in:
parent
527858cf4c
commit
3f343671ce
2 changed files with 194 additions and 35 deletions
159
third_party/cookiesjs/cookies.min.js
vendored
Normal file
159
third_party/cookiesjs/cookies.min.js
vendored
Normal file
|
@ -0,0 +1,159 @@
|
|||
/*
|
||||
* Cookies.js - 1.2.1
|
||||
* https://github.com/ScottHamper/Cookies
|
||||
*/
|
||||
(function (global, undefined) {
|
||||
'use strict';
|
||||
|
||||
var factory = function (window) {
|
||||
if (typeof window.document !== 'object') {
|
||||
throw new Error('Cookies.js requires a `window` with a `document` object');
|
||||
}
|
||||
|
||||
var Cookies = function (key, value, options) {
|
||||
return arguments.length === 1 ?
|
||||
Cookies.get(key) : Cookies.set(key, value, options);
|
||||
};
|
||||
|
||||
// Allows for setter injection in unit tests
|
||||
Cookies._document = window.document;
|
||||
|
||||
// Used to ensure cookie keys do not collide with
|
||||
// built-in `Object` properties
|
||||
Cookies._cacheKeyPrefix = 'cookey.'; // Hurr hurr, :)
|
||||
|
||||
Cookies._maxExpireDate = new Date('Fri, 31 Dec 9999 23:59:59 UTC');
|
||||
|
||||
Cookies.defaults = {
|
||||
path: '/',
|
||||
secure: false
|
||||
};
|
||||
|
||||
Cookies.get = function (key) {
|
||||
if (Cookies._cachedDocumentCookie !== Cookies._document.cookie) {
|
||||
Cookies._renewCache();
|
||||
}
|
||||
|
||||
return Cookies._cache[Cookies._cacheKeyPrefix + key];
|
||||
};
|
||||
|
||||
Cookies.set = function (key, value, options) {
|
||||
options = Cookies._getExtendedOptions(options);
|
||||
options.expires = Cookies._getExpiresDate(value === undefined ? -1 : options.expires);
|
||||
|
||||
Cookies._document.cookie = Cookies._generateCookieString(key, value, options);
|
||||
|
||||
return Cookies;
|
||||
};
|
||||
|
||||
Cookies.expire = function (key, options) {
|
||||
return Cookies.set(key, undefined, options);
|
||||
};
|
||||
|
||||
Cookies._getExtendedOptions = function (options) {
|
||||
return {
|
||||
path: options && options.path || Cookies.defaults.path,
|
||||
domain: options && options.domain || Cookies.defaults.domain,
|
||||
expires: options && options.expires || Cookies.defaults.expires,
|
||||
secure: options && options.secure !== undefined ? options.secure : Cookies.defaults.secure
|
||||
};
|
||||
};
|
||||
|
||||
Cookies._isValidDate = function (date) {
|
||||
return Object.prototype.toString.call(date) === '[object Date]' && !isNaN(date.getTime());
|
||||
};
|
||||
|
||||
Cookies._getExpiresDate = function (expires, now) {
|
||||
now = now || new Date();
|
||||
|
||||
if (typeof expires === 'number') {
|
||||
expires = expires === Infinity ?
|
||||
Cookies._maxExpireDate : new Date(now.getTime() + expires * 1000);
|
||||
} else if (typeof expires === 'string') {
|
||||
expires = new Date(expires);
|
||||
}
|
||||
|
||||
if (expires && !Cookies._isValidDate(expires)) {
|
||||
throw new Error('`expires` parameter cannot be converted to a valid Date instance');
|
||||
}
|
||||
|
||||
return expires;
|
||||
};
|
||||
|
||||
Cookies._generateCookieString = function (key, value, options) {
|
||||
key = key.replace(/[^#$&+\^`|]/g, encodeURIComponent);
|
||||
key = key.replace(/\(/g, '%28').replace(/\)/g, '%29');
|
||||
value = (value + '').replace(/[^!#$&-+\--:<-\[\]-~]/g, encodeURIComponent);
|
||||
options = options || {};
|
||||
|
||||
var cookieString = key + '=' + value;
|
||||
cookieString += options.path ? ';path=' + options.path : '';
|
||||
cookieString += options.domain ? ';domain=' + options.domain : '';
|
||||
cookieString += options.expires ? ';expires=' + options.expires.toUTCString() : '';
|
||||
cookieString += options.secure ? ';secure' : '';
|
||||
|
||||
return cookieString;
|
||||
};
|
||||
|
||||
Cookies._getCacheFromString = function (documentCookie) {
|
||||
var cookieCache = {};
|
||||
var cookiesArray = documentCookie ? documentCookie.split('; ') : [];
|
||||
|
||||
for (var i = 0; i < cookiesArray.length; i++) {
|
||||
var cookieKvp = Cookies._getKeyValuePairFromCookieString(cookiesArray[i]);
|
||||
|
||||
if (cookieCache[Cookies._cacheKeyPrefix + cookieKvp.key] === undefined) {
|
||||
cookieCache[Cookies._cacheKeyPrefix + cookieKvp.key] = cookieKvp.value;
|
||||
}
|
||||
}
|
||||
|
||||
return cookieCache;
|
||||
};
|
||||
|
||||
Cookies._getKeyValuePairFromCookieString = function (cookieString) {
|
||||
// "=" is a valid character in a cookie value according to RFC6265, so cannot `split('=')`
|
||||
var separatorIndex = cookieString.indexOf('=');
|
||||
|
||||
// IE omits the "=" when the cookie value is an empty string
|
||||
separatorIndex = separatorIndex < 0 ? cookieString.length : separatorIndex;
|
||||
|
||||
return {
|
||||
key: decodeURIComponent(cookieString.substr(0, separatorIndex)),
|
||||
value: decodeURIComponent(cookieString.substr(separatorIndex + 1))
|
||||
};
|
||||
};
|
||||
|
||||
Cookies._renewCache = function () {
|
||||
Cookies._cache = Cookies._getCacheFromString(Cookies._document.cookie);
|
||||
Cookies._cachedDocumentCookie = Cookies._document.cookie;
|
||||
};
|
||||
|
||||
Cookies._areEnabled = function () {
|
||||
var testKey = 'cookies.js';
|
||||
var areEnabled = Cookies.set(testKey, 1).get(testKey) === '1';
|
||||
Cookies.expire(testKey);
|
||||
return areEnabled;
|
||||
};
|
||||
|
||||
Cookies.enabled = Cookies._areEnabled();
|
||||
|
||||
return Cookies;
|
||||
};
|
||||
|
||||
var cookiesExport = typeof global.document === 'object' ? factory(global) : factory;
|
||||
|
||||
// AMD support
|
||||
if (typeof define === 'function' && define.amd) {
|
||||
define(function () { return cookiesExport; });
|
||||
// CommonJS/Node.js support
|
||||
} else if (typeof exports === 'object') {
|
||||
// Support Node.js specific `module.exports` (which can be a function)
|
||||
if (typeof module === 'object' && typeof module.exports === 'object') {
|
||||
exports = module.exports = cookiesExport;
|
||||
}
|
||||
// But always support CommonJS module 1.1.1 spec (`exports` cannot be a function)
|
||||
exports.Cookies = cookiesExport;
|
||||
} else {
|
||||
global.Cookies = cookiesExport;
|
||||
}
|
||||
})(typeof window === 'undefined' ? this : window);
|
70
third_party/directory_locations.json
vendored
70
third_party/directory_locations.json
vendored
|
@ -167,138 +167,138 @@
|
|||
},
|
||||
{
|
||||
"source": "cookiesjs/cookies.js",
|
||||
"destination": "devsite/source/assets/js/libs/cookies.js"
|
||||
"destination": "devsite/source/assets/js/libs/"
|
||||
},
|
||||
{
|
||||
"source": "cookiesjs/cookies.js",
|
||||
"destination": "devsite/source/_js/libs/cookies.min.js"
|
||||
"source": "cookiesjs/cookies.min.js",
|
||||
"destination": "devsite/source/_js/libs/"
|
||||
},
|
||||
{
|
||||
"source": "bourbon/",
|
||||
"destination": "devsite/source/_sass/"
|
||||
"destination": "devsite/source/_sass/bourbon/"
|
||||
},
|
||||
{
|
||||
"source": "font-awesome/sass/font-awesome/",
|
||||
"destination": "devsite/source/_sass/"
|
||||
"destination": "devsite/source/_sass/font-awesome/"
|
||||
},
|
||||
{
|
||||
"source": "font-awesome/fonts/fontawesome-webfont.eot",
|
||||
"destination": "devsite/source/assets/fonts/fontawesome-webfont.eot"
|
||||
"destination": "devsite/source/assets/fonts/"
|
||||
},
|
||||
{
|
||||
"source": "font-awesome/fonts/fontawesome-webfont.svg",
|
||||
"destination": "devsite/source/assets/fonts/fontawesome-webfont.svg"
|
||||
"destination": "devsite/source/assets/fonts/"
|
||||
},
|
||||
{
|
||||
"source": "font-awesome/fonts/fontawesome-webfont.ttf",
|
||||
"destination": "devsite/source/assets/fonts/fontawesome-webfont.ttf"
|
||||
"destination": "devsite/source/assets/fonts/"
|
||||
},
|
||||
{
|
||||
"source": "font-awesome/fonts/fontawesome-webfont.woff",
|
||||
"destination": "devsite/source/assets/fonts/fontawesome-webfont.woff"
|
||||
"destination": "devsite/source/assets/fonts/"
|
||||
},
|
||||
{
|
||||
"source": "slick/slick.scss",
|
||||
"destination": "devsite/source/_sass/libs/slick.scss"
|
||||
"destination": "devsite/source/_sass/libs/"
|
||||
},
|
||||
{
|
||||
"source": "slick/slick.eot",
|
||||
"destination": "devsite/source/assets/fonts/slick.eot"
|
||||
"destination": "devsite/source/assets/fonts/"
|
||||
},
|
||||
{
|
||||
"source": "slick/slick.svg",
|
||||
"destination": "devsite/source/assets/fonts/slick.svg"
|
||||
"destination": "devsite/source/assets/fonts/"
|
||||
},
|
||||
{
|
||||
"source": "slick/slick.ttf",
|
||||
"destination": "devsite/source/assets/fonts/slick.ttf"
|
||||
"destination": "devsite/source/assets/fonts/"
|
||||
},
|
||||
{
|
||||
"source": "slick/slick.woff",
|
||||
"destination": "devsite/source/assets/fonts/slick.woff"
|
||||
"destination": "devsite/source/assets/fonts/"
|
||||
},
|
||||
{
|
||||
"source": "slick/slick.js",
|
||||
"destination": "devsite/source/assets/js/libs/slick.js"
|
||||
"destination": "devsite/source/assets/js/libs/"
|
||||
},
|
||||
{
|
||||
"source": "jquery-mmenu/sass/mmenu",
|
||||
"destination": "devsite/source/_sass/"
|
||||
"destination": "devsite/source/_sass/mmenu/"
|
||||
},
|
||||
{
|
||||
"source": "jquery-mmenu/js/jquery.mmenu.footer.js",
|
||||
"destination": "devsite/source/assets/js/libs/jquery.mmenu.footer.js"
|
||||
"destination": "devsite/source/assets/js/libs/"
|
||||
},
|
||||
{
|
||||
"source": "jquery-mmenu/js/jquery.mmenu.offcanvas.js",
|
||||
"destination": "devsite/source/assets/js/libs/jquery.mmenu.offcanvas.js"
|
||||
"destination": "devsite/source/assets/js/libs/"
|
||||
},
|
||||
{
|
||||
"source": "jquery-mmenu/js/jquery.mmenu.oncanvas.js",
|
||||
"destination": "devsite/source/assets/js/libs/jquery.mmenu.oncanvas.js"
|
||||
"destination": "devsite/source/assets/js/libs/"
|
||||
},
|
||||
{
|
||||
"source": "responsive/sass/responsive/",
|
||||
"destination": "devsite/source/_sass/"
|
||||
"destination": "devsite/source/_sass/responsive/"
|
||||
},
|
||||
{
|
||||
"source": "responsive/js/responsive.js",
|
||||
"destination": "devsite/source/js/libs/responsive.js"
|
||||
"destination": "devsite/source/assets/js/libs/"
|
||||
},
|
||||
{
|
||||
"source": "handlebars/handlebars.runtime-v2.0.0.js",
|
||||
"destination": "devsite/source/js/libs/handlebars.runtime-v2.0.0.js"
|
||||
"destination": "devsite/source/assets/js/libs/"
|
||||
},
|
||||
{
|
||||
"source": "algolia/algoliasearch.js",
|
||||
"destination": "devsite/source/js/libs/algoliasearch.js"
|
||||
"destination": "devsite/source/assets/js/libs/"
|
||||
},
|
||||
{
|
||||
"source": "oliver-caldwell/heir.js",
|
||||
"destination": "devsite/source/js/libs/heir.js"
|
||||
"destination": "devsite/source/assets/js/libs/"
|
||||
},
|
||||
{
|
||||
"source": "oliver-caldwell/EventEmitter.js",
|
||||
"destination": "devsite/source/js/libs/EventEmitter.js"
|
||||
"destination": "devsite/source/assets/js/libs/"
|
||||
},
|
||||
{
|
||||
"source": "jquery/jquery-1.11.2.js",
|
||||
"destination": "devsite/source/js/libs/jquery-1.11.2.js"
|
||||
"destination": "devsite/source/assets/js/libs/"
|
||||
},
|
||||
{
|
||||
"source": "jquery-fitvids/jquery.fitvids.js",
|
||||
"destination": "devsite/source/js/libs/jquery.fitvids.js"
|
||||
"destination": "devsite/source/assets/js/libs/"
|
||||
},
|
||||
{
|
||||
"source": "jquery-scrollto/jquery.scrollTo.js",
|
||||
"destination": "devsite/source/js/libs/jquery.scrollTo.js"
|
||||
"destination": "devsite/source/assets/js/libs/"
|
||||
},
|
||||
{
|
||||
"source": "jquery-vide/jquery.vide.js",
|
||||
"destination": "devsite/source/js/libs/jquery.vide.js"
|
||||
"destination": "devsite/source/assets/js/libs/"
|
||||
},
|
||||
{
|
||||
"source": "moment/moment.js",
|
||||
"destination": "devsite/source/js/libs/moment.js"
|
||||
"destination": "devsite/source/assets/js/libs/"
|
||||
},
|
||||
{
|
||||
"source": "query-string/query-string.js",
|
||||
"destination": "devsite/source/js/libs/query-string.js"
|
||||
"destination": "devsite/source/assets/js/libs/"
|
||||
},
|
||||
{
|
||||
"source": "hubspot/select.js",
|
||||
"destination": "devsite/source/js/libs/select.js"
|
||||
"destination": "devsite/source/assets/js/libs/"
|
||||
},
|
||||
{
|
||||
"source": "hubspot/select-theme-default.css",
|
||||
"destination": "devsite/source/css/libs/select-theme-default.css"
|
||||
"destination": "devsite/source/assets/css/libs/"
|
||||
},
|
||||
{
|
||||
"source": "hubspot/tether.js",
|
||||
"destination": "devsite/source/js/libs/tether.js"
|
||||
"destination": "devsite/source/assets/js/libs/"
|
||||
},
|
||||
{
|
||||
"source": "hubspot/utils.js",
|
||||
"destination": "devsite/source/js/libs/utils.js"
|
||||
"destination": "devsite/source/assets/js/libs/"
|
||||
}
|
||||
]
|
||||
|
|
Loading…
Add table
Reference in a new issue