mirror of
https://github.com/idanoo/GoScrobble
synced 2025-07-01 13:42:20 +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
83
web/node_modules/postcss-selector-matches/CHANGELOG.md
generated
vendored
Executable file
83
web/node_modules/postcss-selector-matches/CHANGELOG.md
generated
vendored
Executable file
|
@ -0,0 +1,83 @@
|
|||
# 4.0.0 - 2018-09-17
|
||||
|
||||
- Added: compatibility with postcss v7.x
|
||||
- Added: compatibility with node v6.x
|
||||
|
||||
# 3.0.1 - 2017-05-15
|
||||
|
||||
- Fixed: incorrect export
|
||||
|
||||
# 3.0.0 - 2017-05-11
|
||||
|
||||
- Added: compatibility with postcss v6.x
|
||||
|
||||
# 2.0.5 - 2016-09-13
|
||||
|
||||
- Fixed: another regression of 2.0.2
|
||||
(don't mangle selector parts that don't contain `:matches`)
|
||||
([#13](https://github.com/postcss/postcss-selector-matches/pull/13) - @rgrove)
|
||||
|
||||
# 2.0.4 - 2016-09-06
|
||||
|
||||
- Fixed: another regression of 2.0.2
|
||||
([#10](https://github.com/postcss/postcss-selector-matches/pull/10) - @MoOx)
|
||||
|
||||
# 2.0.3 - 2016-09-06
|
||||
|
||||
- Fixed: regression of 2.0.2 due to a transpilation upgrade
|
||||
(@MoOx)
|
||||
|
||||
# 2.0.2 - 2016-09-06
|
||||
|
||||
- Fixed: .class:matches(element) now produce element.class
|
||||
([#8](https://github.com/postcss/postcss-selector-matches/pull/8) - @yordis)
|
||||
|
||||
# 2.0.1 - 2015-10-26
|
||||
|
||||
- Fixed: pseudo selectors with multiple matches in a selector
|
||||
|
||||
# 2.0.0 - 2015-08-25
|
||||
|
||||
- Removed: compatibility with postcss v4.x
|
||||
- Added: compatibility with postcss v5.x
|
||||
|
||||
# 1.2.1 - 2015-07-14
|
||||
|
||||
- Fixed: plugin is correctly exposed for normal commonjs environments (!babel)
|
||||
([#5](https://github.com/postcss/postcss-selector-matches/issues/5))
|
||||
|
||||
# 1.2.0 - 2015-07-14
|
||||
|
||||
- Fixed: indentation adjustment doesn't contain useless new lines
|
||||
- Fixed: transformation doesn't add some useless whitespace
|
||||
- Added: plugin now expose `replaceRuleSelector` to make it easy to reuse in
|
||||
some others plugins (like `postcss-custom-selectors`).
|
||||
|
||||
# 1.1.2 - 2015-06-29
|
||||
|
||||
- Fixed: support pseudo-element that might be collapsed to :matches()
|
||||
([#4](https://github.com/postcss/postcss-selector-matches/issues/4))
|
||||
- Fixed: doesn't drop selectors parts that do not have :matches() in them
|
||||
|
||||
# 1.1.1 - 2015-06-17
|
||||
|
||||
- Fixed: no more duplicates in generated selector
|
||||
([#3](https://github.com/postcss/postcss-selector-matches/issues/3))
|
||||
|
||||
# 1.1.0 - 2015-06-13
|
||||
|
||||
- Added: `lineBreak` option
|
||||
([#1](https://github.com/postcss/postcss-selector-matches/issues/1))
|
||||
|
||||
# 1.0.2 - 2015-06-13
|
||||
|
||||
- Fixed: support of pseudo classes that use parenthesis
|
||||
([#2](https://github.com/postcss/postcss-selector-matches/issues/2))
|
||||
|
||||
# 1.0.1 - 2015-04-30
|
||||
|
||||
- Fixed: the module now works in non babel environments
|
||||
|
||||
# 1.0.0 - 2015-04-30
|
||||
|
||||
✨ First release
|
20
web/node_modules/postcss-selector-matches/LICENSE
generated
vendored
Executable file
20
web/node_modules/postcss-selector-matches/LICENSE
generated
vendored
Executable file
|
@ -0,0 +1,20 @@
|
|||
The MIT License (MIT)
|
||||
|
||||
Copyright (c) 2017 Maxime Thirouin
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy of
|
||||
this software and associated documentation files (the "Software"), to deal in
|
||||
the Software without restriction, including without limitation the rights to
|
||||
use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
|
||||
the Software, and to permit persons to whom the Software is furnished to do so,
|
||||
subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in all
|
||||
copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
|
||||
FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
|
||||
COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
|
||||
IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
|
||||
CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
55
web/node_modules/postcss-selector-matches/README.md
generated
vendored
Normal file
55
web/node_modules/postcss-selector-matches/README.md
generated
vendored
Normal file
|
@ -0,0 +1,55 @@
|
|||
# postcss-selector-matches [](https://cssdb.org/#matches-pseudo-class) [](https://travis-ci.org/postcss/postcss-selector-matches)
|
||||
|
||||
> PostCSS plugin to transform `:matches()` W3C CSS pseudo class to more compatible CSS selectors
|
||||
|
||||
http://dev.w3.org/csswg/selectors-4/#matches
|
||||
|
||||
## Installation
|
||||
|
||||
```console
|
||||
$ npm install postcss-selector-matches
|
||||
```
|
||||
|
||||
## Usage
|
||||
|
||||
```js
|
||||
var postcss = require("postcss")
|
||||
|
||||
var output = postcss()
|
||||
.use(require("postcss-selector-matches"))
|
||||
.process(require("fs").readFileSync("input.css", "utf8"))
|
||||
.css
|
||||
```
|
||||
|
||||
Using this `input.css`:
|
||||
|
||||
```css
|
||||
p:matches(:first-child, .special) {
|
||||
color: red;
|
||||
}
|
||||
```
|
||||
|
||||
you will get:
|
||||
|
||||
```css
|
||||
p:first-child, p.special {
|
||||
color: red;
|
||||
}
|
||||
```
|
||||
|
||||
**Note that if you are doing crazy selector like `p:matches(a) {}` you are likely to get crazy results (like `pa {}`)**.
|
||||
|
||||
|
||||
## Options
|
||||
|
||||
### `lineBreak`
|
||||
|
||||
(default: `false`)
|
||||
|
||||
Allows you to introduce a line break between generated selectors.
|
||||
|
||||
---
|
||||
|
||||
## [Changelog](CHANGELOG.md)
|
||||
|
||||
## [License](LICENSE)
|
30
web/node_modules/postcss-selector-matches/dist/index.js
generated
vendored
Normal file
30
web/node_modules/postcss-selector-matches/dist/index.js
generated
vendored
Normal file
|
@ -0,0 +1,30 @@
|
|||
"use strict";
|
||||
|
||||
Object.defineProperty(exports, "__esModule", {
|
||||
value: true
|
||||
});
|
||||
|
||||
var _postcss = require("postcss");
|
||||
|
||||
var _postcss2 = _interopRequireDefault(_postcss);
|
||||
|
||||
var _replaceRuleSelector = require("./replaceRuleSelector");
|
||||
|
||||
var _replaceRuleSelector2 = _interopRequireDefault(_replaceRuleSelector);
|
||||
|
||||
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
||||
|
||||
function explodeSelectors() {
|
||||
var options = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
|
||||
|
||||
return function (css) {
|
||||
css.walkRules(function (rule) {
|
||||
if (rule.selector && rule.selector.indexOf(":matches") > -1) {
|
||||
rule.selector = (0, _replaceRuleSelector2.default)(rule, options);
|
||||
}
|
||||
});
|
||||
};
|
||||
}
|
||||
|
||||
exports.default = _postcss2.default.plugin("postcss-selector-matches", explodeSelectors);
|
||||
module.exports = exports.default;
|
88
web/node_modules/postcss-selector-matches/dist/replaceRuleSelector.js
generated
vendored
Normal file
88
web/node_modules/postcss-selector-matches/dist/replaceRuleSelector.js
generated
vendored
Normal file
|
@ -0,0 +1,88 @@
|
|||
"use strict";
|
||||
|
||||
Object.defineProperty(exports, "__esModule", {
|
||||
value: true
|
||||
});
|
||||
exports.default = replaceRuleSelector;
|
||||
|
||||
var _list = require("postcss/lib/list");
|
||||
|
||||
var _list2 = _interopRequireDefault(_list);
|
||||
|
||||
var _balancedMatch = require("balanced-match");
|
||||
|
||||
var _balancedMatch2 = _interopRequireDefault(_balancedMatch);
|
||||
|
||||
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
||||
|
||||
function _toConsumableArray(arr) { if (Array.isArray(arr)) { for (var i = 0, arr2 = Array(arr.length); i < arr.length; i++) { arr2[i] = arr[i]; } return arr2; } else { return Array.from(arr); } }
|
||||
|
||||
var pseudoClass = ":matches";
|
||||
var selectorElementRE = /^[a-zA-Z]/;
|
||||
|
||||
function isElementSelector(selector) {
|
||||
var matches = selectorElementRE.exec(selector);
|
||||
// console.log({selector, matches})
|
||||
return matches;
|
||||
}
|
||||
|
||||
function normalizeSelector(selector, preWhitespace, pre) {
|
||||
if (isElementSelector(selector) && !isElementSelector(pre)) {
|
||||
return `${preWhitespace}${selector}${pre}`;
|
||||
}
|
||||
|
||||
return `${preWhitespace}${pre}${selector}`;
|
||||
}
|
||||
|
||||
function explodeSelector(selector, options) {
|
||||
if (selector && selector.indexOf(pseudoClass) > -1) {
|
||||
var newSelectors = [];
|
||||
var preWhitespaceMatches = selector.match(/^\s+/);
|
||||
var preWhitespace = preWhitespaceMatches ? preWhitespaceMatches[0] : "";
|
||||
var selectorPart = _list2.default.comma(selector);
|
||||
selectorPart.forEach(function (part) {
|
||||
var position = part.indexOf(pseudoClass);
|
||||
var pre = part.slice(0, position);
|
||||
var body = part.slice(position);
|
||||
var matches = (0, _balancedMatch2.default)("(", ")", body);
|
||||
|
||||
var bodySelectors = matches && matches.body ? _list2.default.comma(matches.body).reduce(function (acc, s) {
|
||||
return [].concat(_toConsumableArray(acc), _toConsumableArray(explodeSelector(s, options)));
|
||||
}, []) : [body];
|
||||
|
||||
var postSelectors = matches && matches.post ? explodeSelector(matches.post, options) : [];
|
||||
|
||||
var newParts = void 0;
|
||||
if (postSelectors.length === 0) {
|
||||
// the test below is a poor way to try we are facing a piece of a
|
||||
// selector...
|
||||
if (position === -1 || pre.indexOf(" ") > -1) {
|
||||
newParts = bodySelectors.map(function (s) {
|
||||
return preWhitespace + pre + s;
|
||||
});
|
||||
} else {
|
||||
newParts = bodySelectors.map(function (s) {
|
||||
return normalizeSelector(s, preWhitespace, pre);
|
||||
});
|
||||
}
|
||||
} else {
|
||||
newParts = [];
|
||||
postSelectors.forEach(function (postS) {
|
||||
bodySelectors.forEach(function (s) {
|
||||
newParts.push(preWhitespace + pre + s + postS);
|
||||
});
|
||||
});
|
||||
}
|
||||
newSelectors = [].concat(_toConsumableArray(newSelectors), _toConsumableArray(newParts));
|
||||
});
|
||||
|
||||
return newSelectors;
|
||||
}
|
||||
return [selector];
|
||||
}
|
||||
|
||||
function replaceRuleSelector(rule, options) {
|
||||
var indentation = rule.raws && rule.raws.before ? rule.raws.before.split("\n").pop() : "";
|
||||
return explodeSelector(rule.selector, options).join("," + (options.lineBreak ? "\n" + indentation : " "));
|
||||
}
|
||||
module.exports = exports.default;
|
42
web/node_modules/postcss-selector-matches/package.json
generated
vendored
Normal file
42
web/node_modules/postcss-selector-matches/package.json
generated
vendored
Normal file
|
@ -0,0 +1,42 @@
|
|||
{
|
||||
"name": "postcss-selector-matches",
|
||||
"version": "4.0.0",
|
||||
"description": "PostCSS plugin to transform :matches() W3C CSS pseudo class to more compatible CSS selectors",
|
||||
"keywords": [
|
||||
"postcss",
|
||||
"postcss-plugin",
|
||||
"selectors",
|
||||
"selector",
|
||||
"matches"
|
||||
],
|
||||
"author": "Maxime Thirouin",
|
||||
"license": "MIT",
|
||||
"repository": "https://github.com/postcss/postcss-selector-matches.git",
|
||||
"main": "dist/index.js",
|
||||
"files": [
|
||||
"dist"
|
||||
],
|
||||
"dependencies": {
|
||||
"balanced-match": "^1.0.0",
|
||||
"postcss": "^7.0.2"
|
||||
},
|
||||
"devDependencies": {
|
||||
"babel-cli": "^6.26.0",
|
||||
"babel-plugin-add-module-exports": "^1.0.0",
|
||||
"babel-preset-env": "^1.7.0",
|
||||
"babel-preset-es2015": "^6.24.1",
|
||||
"babel-preset-stage-2": "^6.24.1",
|
||||
"babel-register": "^6.26.0",
|
||||
"eslint": "^5.6.0",
|
||||
"npmpub": "^4.1.0",
|
||||
"tape": "^4.9.1"
|
||||
},
|
||||
"scripts": {
|
||||
"lint": "eslint ./src/*.js ./test/*.js",
|
||||
"tape": "tape -r babel-register test/*.js",
|
||||
"test": "npm run lint && npm run babelify && npm run tape",
|
||||
"babelify": "babel src --out-dir dist",
|
||||
"prepublish": "npm run babelify",
|
||||
"release": "npmpub"
|
||||
}
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue