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
70
web/node_modules/postcss-discard-duplicates/CHANGELOG.md
generated
vendored
Normal file
70
web/node_modules/postcss-discard-duplicates/CHANGELOG.md
generated
vendored
Normal file
|
@ -0,0 +1,70 @@
|
|||
# 4.0.0-rc.0
|
||||
|
||||
* Breaking: Drops support for Node 0.12, we now require at least Node 4.
|
||||
* Breaking: Update PostCSS to 6.0.0.
|
||||
|
||||
# 2.1.0
|
||||
|
||||
* Now supports discarding duplicates irrespective of property order, better
|
||||
support for legacy hacks & partial duplicate removal (thanks to @andyjansson).
|
||||
|
||||
# 2.0.2
|
||||
|
||||
* Major performance boost by lessening algorithmic complexity; each node is
|
||||
now cached and the nested loop removed, meaning that each node is cast to a
|
||||
string only once (thanks to @asztal).
|
||||
|
||||
# 2.0.1
|
||||
|
||||
* Now compiled with babel 6.
|
||||
* Minor performance boost from exiting from the `dedupe` function if the node
|
||||
has less than two child nodes.
|
||||
|
||||
# 2.0.0
|
||||
|
||||
* Upgraded to PostCSS 5.
|
||||
|
||||
# 1.2.1
|
||||
|
||||
* Fixes an integration test failure with cssnano; use PostCSS `each` rather
|
||||
than native `forEach` (thanks to @TrySound).
|
||||
|
||||
# 1.2.0
|
||||
|
||||
* Improved duplicate detection (thanks to @TrySound).
|
||||
|
||||
# 1.1.6
|
||||
|
||||
* Improved performance by caching string representations of nodes, and
|
||||
minimising stringifying as much as possible (thanks to @TrySound).
|
||||
|
||||
# 1.1.5
|
||||
|
||||
* Fixed an issue where comments were being deduplicated.
|
||||
|
||||
# 1.1.4
|
||||
|
||||
* Improved performance by making all AST iterations in a single pass.
|
||||
|
||||
# 1.1.3
|
||||
|
||||
* Improved documentation for compatibility with the plugin guidelines.
|
||||
* Simplify main source code.
|
||||
|
||||
# 1.1.2
|
||||
|
||||
* Fixed an issue where declarations inside similar keyframes were being
|
||||
discarded incorrectly.
|
||||
|
||||
# 1.1.1
|
||||
|
||||
* Fixed a bug where keyframe rules were being incorrectly discarded, if they had
|
||||
the same declarations but different vendor prefixes.
|
||||
|
||||
# 1.1.0
|
||||
|
||||
* Now uses the PostCSS `4.1` plugin API.
|
||||
|
||||
# 1.0.0
|
||||
|
||||
* Initial release.
|
22
web/node_modules/postcss-discard-duplicates/LICENSE-MIT
generated
vendored
Normal file
22
web/node_modules/postcss-discard-duplicates/LICENSE-MIT
generated
vendored
Normal file
|
@ -0,0 +1,22 @@
|
|||
Copyright (c) Ben Briggs <beneb.info@gmail.com> (http://beneb.info)
|
||||
|
||||
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.
|
70
web/node_modules/postcss-discard-duplicates/README.md
generated
vendored
Normal file
70
web/node_modules/postcss-discard-duplicates/README.md
generated
vendored
Normal file
|
@ -0,0 +1,70 @@
|
|||
# [postcss][postcss]-discard-duplicates
|
||||
|
||||
> Discard duplicate rules in your CSS files with PostCSS.
|
||||
|
||||
## Install
|
||||
|
||||
With [npm](https://npmjs.org/package/postcss-discard-duplicates) do:
|
||||
|
||||
```
|
||||
npm install postcss-discard-duplicates --save
|
||||
```
|
||||
|
||||
## Example
|
||||
|
||||
This module will remove all duplicate rules from your stylesheets. It works on
|
||||
at rules, normal rules and declarations. Note that this module does not have any
|
||||
responsibility for normalising declarations, selectors or whitespace, so that it
|
||||
considers these two rules to be different:
|
||||
|
||||
```css
|
||||
h1, h2 {
|
||||
color: blue;
|
||||
}
|
||||
|
||||
h2, h1 {
|
||||
color: blue;
|
||||
}
|
||||
```
|
||||
|
||||
It has to assume that your rules have already been transformed by another
|
||||
processor, otherwise it would be responsible for too many things.
|
||||
|
||||
### Input
|
||||
|
||||
```css
|
||||
h1 {
|
||||
margin: 0 auto;
|
||||
margin: 0 auto
|
||||
}
|
||||
|
||||
h1 {
|
||||
margin: 0 auto
|
||||
}
|
||||
```
|
||||
|
||||
### Output
|
||||
|
||||
```css
|
||||
h1 {
|
||||
margin: 0 auto
|
||||
}
|
||||
```
|
||||
|
||||
## Usage
|
||||
|
||||
See the [PostCSS documentation](https://github.com/postcss/postcss#usage) for
|
||||
examples for your environment.
|
||||
|
||||
|
||||
## Contributors
|
||||
|
||||
See [CONTRIBUTORS.md](https://github.com/cssnano/cssnano/blob/master/CONTRIBUTORS.md).
|
||||
|
||||
|
||||
## License
|
||||
|
||||
MIT © [Ben Briggs](http://beneb.info)
|
||||
|
||||
|
||||
[postcss]: https://github.com/postcss/postcss
|
131
web/node_modules/postcss-discard-duplicates/dist/index.js
generated
vendored
Normal file
131
web/node_modules/postcss-discard-duplicates/dist/index.js
generated
vendored
Normal file
|
@ -0,0 +1,131 @@
|
|||
'use strict';
|
||||
|
||||
Object.defineProperty(exports, "__esModule", {
|
||||
value: true
|
||||
});
|
||||
|
||||
var _postcss = require('postcss');
|
||||
|
||||
function noop() {}
|
||||
|
||||
function trimValue(value) {
|
||||
return value ? value.trim() : value;
|
||||
}
|
||||
|
||||
function empty(node) {
|
||||
return !node.nodes.filter(child => child.type !== 'comment').length;
|
||||
}
|
||||
|
||||
function equals(a, b) {
|
||||
if (a.type !== b.type) {
|
||||
return false;
|
||||
}
|
||||
|
||||
if (a.important !== b.important) {
|
||||
return false;
|
||||
}
|
||||
|
||||
if (a.raws && !b.raws || !a.raws && b.raws) {
|
||||
return false;
|
||||
}
|
||||
|
||||
switch (a.type) {
|
||||
case 'rule':
|
||||
if (a.selector !== b.selector) {
|
||||
return false;
|
||||
}
|
||||
break;
|
||||
case 'atrule':
|
||||
if (a.name !== b.name || a.params !== b.params) {
|
||||
return false;
|
||||
}
|
||||
|
||||
if (a.raws && trimValue(a.raws.before) !== trimValue(b.raws.before)) {
|
||||
return false;
|
||||
}
|
||||
|
||||
if (a.raws && trimValue(a.raws.afterName) !== trimValue(b.raws.afterName)) {
|
||||
return false;
|
||||
}
|
||||
break;
|
||||
case 'decl':
|
||||
if (a.prop !== b.prop || a.value !== b.value) {
|
||||
return false;
|
||||
}
|
||||
|
||||
if (a.raws && trimValue(a.raws.before) !== trimValue(b.raws.before)) {
|
||||
return false;
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
||||
if (a.nodes) {
|
||||
if (a.nodes.length !== b.nodes.length) {
|
||||
return false;
|
||||
}
|
||||
|
||||
for (let i = 0; i < a.nodes.length; i++) {
|
||||
if (!equals(a.nodes[i], b.nodes[i])) {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
function dedupeRule(last, nodes) {
|
||||
let index = nodes.indexOf(last) - 1;
|
||||
while (index >= 0) {
|
||||
const node = nodes[index--];
|
||||
if (node && node.type === 'rule' && node.selector === last.selector) {
|
||||
last.each(child => {
|
||||
if (child.type === 'decl') {
|
||||
dedupeNode(child, node.nodes);
|
||||
}
|
||||
});
|
||||
|
||||
if (empty(node)) {
|
||||
node.remove();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
function dedupeNode(last, nodes) {
|
||||
let index = !!~nodes.indexOf(last) ? nodes.indexOf(last) - 1 : nodes.length - 1;
|
||||
|
||||
while (index >= 0) {
|
||||
const node = nodes[index--];
|
||||
if (node && equals(node, last)) {
|
||||
node.remove();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
const handlers = {
|
||||
rule: dedupeRule,
|
||||
atrule: dedupeNode,
|
||||
decl: dedupeNode,
|
||||
comment: noop
|
||||
};
|
||||
|
||||
function dedupe(root) {
|
||||
const { nodes } = root;
|
||||
|
||||
if (!nodes) {
|
||||
return;
|
||||
}
|
||||
|
||||
let index = nodes.length - 1;
|
||||
while (index >= 0) {
|
||||
let last = nodes[index--];
|
||||
if (!last || !last.parent) {
|
||||
continue;
|
||||
}
|
||||
dedupe(last);
|
||||
handlers[last.type](last, nodes);
|
||||
}
|
||||
}
|
||||
|
||||
exports.default = (0, _postcss.plugin)('postcss-discard-duplicates', () => dedupe);
|
||||
module.exports = exports['default'];
|
41
web/node_modules/postcss-discard-duplicates/package.json
generated
vendored
Normal file
41
web/node_modules/postcss-discard-duplicates/package.json
generated
vendored
Normal file
|
@ -0,0 +1,41 @@
|
|||
{
|
||||
"name": "postcss-discard-duplicates",
|
||||
"version": "4.0.2",
|
||||
"description": "Discard duplicate rules in your CSS files with PostCSS.",
|
||||
"main": "dist/index.js",
|
||||
"files": [
|
||||
"dist",
|
||||
"LICENSE-MIT"
|
||||
],
|
||||
"scripts": {
|
||||
"prepublish": "cross-env BABEL_ENV=publish babel src --out-dir dist --ignore /__tests__/"
|
||||
},
|
||||
"keywords": [
|
||||
"css",
|
||||
"dedupe",
|
||||
"optimise",
|
||||
"postcss",
|
||||
"postcss-plugin"
|
||||
],
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"postcss": "^7.0.0"
|
||||
},
|
||||
"devDependencies": {
|
||||
"babel-cli": "^6.0.0",
|
||||
"cross-env": "^5.0.0"
|
||||
},
|
||||
"homepage": "https://github.com/cssnano/cssnano",
|
||||
"author": {
|
||||
"name": "Ben Briggs",
|
||||
"email": "beneb.info@gmail.com",
|
||||
"url": "http://beneb.info"
|
||||
},
|
||||
"repository": "cssnano/cssnano",
|
||||
"bugs": {
|
||||
"url": "https://github.com/cssnano/cssnano/issues"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">=6.9.0"
|
||||
}
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue