mirror of
https://github.com/idanoo/GoScrobble
synced 2025-07-01 21:52:19 +00:00
0.2.0 - Mid migration
This commit is contained in:
parent
139e6a915e
commit
7e38fdbd7d
42393 changed files with 5358157 additions and 62 deletions
93
web/node_modules/postcss-normalize-timing-functions/dist/index.js
generated
vendored
Normal file
93
web/node_modules/postcss-normalize-timing-functions/dist/index.js
generated
vendored
Normal file
|
@ -0,0 +1,93 @@
|
|||
'use strict';
|
||||
|
||||
Object.defineProperty(exports, "__esModule", {
|
||||
value: true
|
||||
});
|
||||
|
||||
var _postcss = require('postcss');
|
||||
|
||||
var _postcssValueParser = require('postcss-value-parser');
|
||||
|
||||
var _postcssValueParser2 = _interopRequireDefault(_postcssValueParser);
|
||||
|
||||
var _cssnanoUtilGetMatch = require('cssnano-util-get-match');
|
||||
|
||||
var _cssnanoUtilGetMatch2 = _interopRequireDefault(_cssnanoUtilGetMatch);
|
||||
|
||||
var _map = require('./lib/map');
|
||||
|
||||
var _map2 = _interopRequireDefault(_map);
|
||||
|
||||
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
||||
|
||||
const getMatch = (0, _cssnanoUtilGetMatch2.default)(_map2.default);
|
||||
const getValue = node => parseFloat(node.value);
|
||||
|
||||
function evenValues(list, index) {
|
||||
return index % 2 === 0;
|
||||
}
|
||||
|
||||
function reduce(node) {
|
||||
if (node.type !== 'function') {
|
||||
return false;
|
||||
}
|
||||
|
||||
const lowerCasedValue = node.value.toLowerCase();
|
||||
|
||||
if (lowerCasedValue === 'steps') {
|
||||
// Don't bother checking the step-end case as it has the same length
|
||||
// as steps(1)
|
||||
if (getValue(node.nodes[0]) === 1 && node.nodes[2] && node.nodes[2].value.toLowerCase() === 'start') {
|
||||
node.type = 'word';
|
||||
node.value = 'step-start';
|
||||
|
||||
delete node.nodes;
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
// The end case is actually the browser default, so it isn't required.
|
||||
if (node.nodes[2] && node.nodes[2].value.toLowerCase() === 'end') {
|
||||
node.nodes = [node.nodes[0]];
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
if (lowerCasedValue === 'cubic-bezier') {
|
||||
const match = getMatch(node.nodes.filter(evenValues).map(getValue));
|
||||
|
||||
if (match) {
|
||||
node.type = 'word';
|
||||
node.value = match;
|
||||
|
||||
delete node.nodes;
|
||||
|
||||
return;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
exports.default = (0, _postcss.plugin)('postcss-normalize-timing-functions', () => {
|
||||
return css => {
|
||||
const cache = {};
|
||||
|
||||
css.walkDecls(/(animation|transition)(-timing-function|$)/i, decl => {
|
||||
const value = decl.value;
|
||||
|
||||
if (cache[value]) {
|
||||
decl.value = cache[value];
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
const result = (0, _postcssValueParser2.default)(value).walk(reduce).toString();
|
||||
|
||||
decl.value = result;
|
||||
cache[value] = result;
|
||||
});
|
||||
};
|
||||
});
|
||||
module.exports = exports['default'];
|
7
web/node_modules/postcss-normalize-timing-functions/dist/lib/map.js
generated
vendored
Normal file
7
web/node_modules/postcss-normalize-timing-functions/dist/lib/map.js
generated
vendored
Normal file
|
@ -0,0 +1,7 @@
|
|||
'use strict';
|
||||
|
||||
Object.defineProperty(exports, "__esModule", {
|
||||
value: true
|
||||
});
|
||||
exports.default = [['ease', [0.25, 0.1, 0.25, 1]], ['linear', [0, 0, 1, 1]], ['ease-in', [0.42, 0, 1, 1]], ['ease-out', [0, 0, 0.58, 1]], ['ease-in-out', [0.42, 0, 0.58, 1]]];
|
||||
module.exports = exports['default'];
|
Loading…
Add table
Add a link
Reference in a new issue