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
43
web/node_modules/postcss-font-variant/CHANGELOG.md
generated
vendored
Executable file
43
web/node_modules/postcss-font-variant/CHANGELOG.md
generated
vendored
Executable file
|
@ -0,0 +1,43 @@
|
|||
# 4.0.1 - 2020-10-28
|
||||
|
||||
- Fixed: Incorrect conversion of small-caps ([#15](https://github.com/postcss/postcss-font-variant/pull/15))
|
||||
|
||||
# 4.0.0 - 2018-09-17
|
||||
|
||||
- Changed: use PostCSS 7 API
|
||||
|
||||
# 3.0.0 - 2017-05-11
|
||||
|
||||
- Changed: use PostCSS 6 API
|
||||
|
||||
# 2.0.1 - 2016-07-08
|
||||
|
||||
- Fixed: existing font-feature-settings being duplicated.
|
||||
([#8](https://github.com/postcss/postcss-font-variant/pull/8) - @ChaosExAnima)
|
||||
|
||||
# 2.0.0 - 2015-09-08
|
||||
|
||||
- Added: compatibility with postcss v5.x
|
||||
- Removed: compatiblity with postcss v4.x
|
||||
|
||||
# 1.2.0 - 2015-08-13
|
||||
|
||||
- Added: compatibility with postcss v4.1.x
|
||||
([#5](https://github.com/postcss/postcss-font-variant/pull/5))
|
||||
|
||||
# 1.1.0 - 2015-01-29
|
||||
|
||||
- Fixed: Properly handle font-variant-position:normal ([#3](https://github.com/postcss/postcss-font-variant/pull/3))
|
||||
- Added: support font-kerning ([#2](https://github.com/postcss/postcss-font-variant/pull/2))
|
||||
|
||||
# 1.0.2 - 2015-01-27
|
||||
|
||||
- Fixed: Re–use existing font-feature-settings declarations to avoid creating multiples that override themselves ([#1](https://github.com/postcss/postcss-font-variant/pull/1))
|
||||
|
||||
# 1.0.1 - 2014-11-11
|
||||
|
||||
- Fixed: wrong space char that breaks on some environnements
|
||||
|
||||
# 1.0.0 - 2014-10-09
|
||||
|
||||
✨ First release based on [rework-font-variant](https://github.com/ianstormtaylor/rework-font-variant) v1.0.1
|
20
web/node_modules/postcss-font-variant/LICENSE
generated
vendored
Executable file
20
web/node_modules/postcss-font-variant/LICENSE
generated
vendored
Executable file
|
@ -0,0 +1,20 @@
|
|||
The MIT License (MIT)
|
||||
|
||||
Copyright (c) 2014 Maxime Thirouin & Ian Storm Taylor
|
||||
|
||||
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.
|
74
web/node_modules/postcss-font-variant/README.md
generated
vendored
Executable file
74
web/node_modules/postcss-font-variant/README.md
generated
vendored
Executable file
|
@ -0,0 +1,74 @@
|
|||
# PostCSS Font-Variant [<img src="https://postcss.github.io/postcss/logo.svg" alt="PostCSS Logo" width="90" height="90" align="right">](https://github.com/postcss/postcss/)
|
||||
|
||||
[](https://cssdb.org/#font-variant-property)
|
||||
[](https://travis-ci.org/postcss/postcss-font-variant)
|
||||
|
||||
PostCSS Font-Variant lets you use `font-variant` in CSS, following the
|
||||
[CSS Fonts](https://www.w3.org/TR/css-fonts-3/#font-variant-prop) specification.
|
||||
|
||||
## Installation
|
||||
|
||||
```console
|
||||
$ npm install postcss-font-variant
|
||||
```
|
||||
|
||||
## Usage
|
||||
|
||||
```js
|
||||
// dependencies
|
||||
var postcss = require("postcss")
|
||||
var fontVariant = require("postcss-font-variant")
|
||||
|
||||
// css to be processed
|
||||
var css = fs.readFileSync("input.css", "utf8")
|
||||
|
||||
// process css using postcss-font-variant
|
||||
var out = postcss()
|
||||
.use(fontVariant())
|
||||
.process(css)
|
||||
.css
|
||||
```
|
||||
|
||||
Using this `input.css`:
|
||||
|
||||
```css
|
||||
h2 {
|
||||
font-variant-caps: small-caps;
|
||||
}
|
||||
|
||||
table {
|
||||
font-variant-numeric: lining-nums;
|
||||
}
|
||||
```
|
||||
|
||||
you will get:
|
||||
|
||||
```css
|
||||
h2 {
|
||||
font-feature-settings: "smcp";
|
||||
font-variant-caps: small-caps;
|
||||
}
|
||||
|
||||
table {
|
||||
font-feature-settings: "lnum";
|
||||
font-variant-numeric: lining-nums;
|
||||
}
|
||||
|
||||
```
|
||||
|
||||
Checkout [tests](test) for more examples.
|
||||
|
||||
---
|
||||
|
||||
## Contributing
|
||||
|
||||
Work on a branch, install dev-dependencies, respect coding style & run tests before submitting a bug fix or a feature.
|
||||
|
||||
$ git clone https://github.com/postcss/postcss-font-variant.git
|
||||
$ git checkout -b patch-1
|
||||
$ npm install
|
||||
$ npm test
|
||||
|
||||
## [Changelog](CHANGELOG.md)
|
||||
|
||||
## [License](LICENSE)
|
121
web/node_modules/postcss-font-variant/index.js
generated
vendored
Executable file
121
web/node_modules/postcss-font-variant/index.js
generated
vendored
Executable file
|
@ -0,0 +1,121 @@
|
|||
var postcss = require("postcss");
|
||||
|
||||
/**
|
||||
* font variant convertion map
|
||||
*
|
||||
* @type {Object}
|
||||
*/
|
||||
var fontVariantProperties = {
|
||||
"font-variant-ligatures": {
|
||||
"common-ligatures": "\"liga\", \"clig\"",
|
||||
"no-common-ligatures": "\"liga\", \"clig off\"",
|
||||
"discretionary-ligatures": "\"dlig\"",
|
||||
"no-discretionary-ligatures": "\"dlig\" off",
|
||||
"historical-ligatures": "\"hlig\"",
|
||||
"no-historical-ligatures": "\"hlig\" off",
|
||||
contextual: "\"calt\"",
|
||||
"no-contextual": "\"calt\" off"
|
||||
},
|
||||
|
||||
"font-variant-position": {
|
||||
sub: "\"subs\"",
|
||||
"super": "\"sups\"",
|
||||
normal: "\"subs\" off, \"sups\" off"
|
||||
},
|
||||
|
||||
"font-variant-caps": {
|
||||
"small-caps": "\"smcp\"",
|
||||
"all-small-caps": "\"smcp\", \"c2sc\"",
|
||||
"petite-caps": "\"pcap\"",
|
||||
"all-petite-caps": "\"pcap\", \"c2pc\"",
|
||||
unicase: "\"unic\"",
|
||||
"titling-caps": "\"titl\""
|
||||
},
|
||||
|
||||
"font-variant-numeric": {
|
||||
"lining-nums": "\"lnum\"",
|
||||
"oldstyle-nums": "\"onum\"",
|
||||
"proportional-nums": "\"pnum\"",
|
||||
"tabular-nums": "\"tnum\"",
|
||||
"diagonal-fractions": "\"frac\"",
|
||||
"stacked-fractions": "\"afrc\"",
|
||||
ordinal: "\"ordn\"",
|
||||
"slashed-zero": "\"zero\""
|
||||
},
|
||||
|
||||
"font-kerning": {
|
||||
normal: "\"kern\"",
|
||||
none: "\"kern\" off"
|
||||
},
|
||||
|
||||
"font-variant": {
|
||||
normal: "normal",
|
||||
inherit: "inherit"
|
||||
}
|
||||
}
|
||||
|
||||
// The `font-variant` property is a shorthand for all the others.
|
||||
for (var prop in fontVariantProperties) {
|
||||
var keys = fontVariantProperties[prop]
|
||||
for (var key in keys) {
|
||||
if (!(key in fontVariantProperties["font-variant"])) {
|
||||
fontVariantProperties["font-variant"][key] = keys[key]
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Find font-feature-settings declaration before given declaration,
|
||||
// create if does not exist
|
||||
function getFontFeatureSettingsPrevTo(decl) {
|
||||
var fontFeatureSettings = null;
|
||||
decl.parent.walkDecls(function(decl) {
|
||||
if (decl.prop === "font-feature-settings") {
|
||||
fontFeatureSettings = decl;
|
||||
}
|
||||
})
|
||||
|
||||
if (fontFeatureSettings === null) {
|
||||
fontFeatureSettings = decl.clone()
|
||||
fontFeatureSettings.prop = "font-feature-settings"
|
||||
fontFeatureSettings.value = ""
|
||||
decl.parent.insertBefore(decl, fontFeatureSettings)
|
||||
}
|
||||
return fontFeatureSettings
|
||||
}
|
||||
|
||||
/**
|
||||
* Expose the font-variant plugin.
|
||||
*/
|
||||
module.exports = postcss.plugin("postcss-font-variant", function() {
|
||||
return function(styles) {
|
||||
styles.walkRules(function(rule) {
|
||||
var fontFeatureSettings = null
|
||||
// read custom media queries
|
||||
rule.walkDecls(function(decl) {
|
||||
if (!fontVariantProperties[decl.prop]) {
|
||||
return null
|
||||
}
|
||||
|
||||
var newValue = decl.value
|
||||
if (decl.prop === "font-variant") {
|
||||
newValue = decl.value.split(/\s+/g).map(function(val) {
|
||||
return fontVariantProperties["font-variant"][val]
|
||||
}).join(", ")
|
||||
}
|
||||
else if (fontVariantProperties[decl.prop][decl.value]) {
|
||||
newValue = fontVariantProperties[decl.prop][decl.value]
|
||||
}
|
||||
|
||||
if (fontFeatureSettings === null) {
|
||||
fontFeatureSettings = getFontFeatureSettingsPrevTo(decl);
|
||||
}
|
||||
if (fontFeatureSettings.value && fontFeatureSettings.value !== newValue) {
|
||||
fontFeatureSettings.value += ", " + newValue;
|
||||
}
|
||||
else {
|
||||
fontFeatureSettings.value = newValue;
|
||||
}
|
||||
})
|
||||
})
|
||||
}
|
||||
})
|
35
web/node_modules/postcss-font-variant/package.json
generated
vendored
Normal file
35
web/node_modules/postcss-font-variant/package.json
generated
vendored
Normal file
|
@ -0,0 +1,35 @@
|
|||
{
|
||||
"name": "postcss-font-variant",
|
||||
"version": "4.0.1",
|
||||
"description": "PostCSS plugin to transform W3C font-variant properties to more compatible CSS (font-feature-settings)",
|
||||
"keywords": [
|
||||
"css",
|
||||
"postcss",
|
||||
"postcss-plugin",
|
||||
"font",
|
||||
"variant",
|
||||
"font-variant"
|
||||
],
|
||||
"author": "Maxime Thirouin",
|
||||
"license": "MIT",
|
||||
"repository": "https://github.com/postcss/postcss-font-variant.git",
|
||||
"files": [
|
||||
"index.js"
|
||||
],
|
||||
"dependencies": {
|
||||
"postcss": "^7.0.2"
|
||||
},
|
||||
"devDependencies": {
|
||||
"jscs": "^3.0.7",
|
||||
"jshint": "^2.9.6",
|
||||
"npmpub": "^4.1.0",
|
||||
"tape": "^4.9.1"
|
||||
},
|
||||
"scripts": {
|
||||
"lint": "npm run jscs && npm run jshint",
|
||||
"jscs": "jscs index.js test/index.js",
|
||||
"jshint": "jshint . --exclude-path .gitignore",
|
||||
"test": "npm run lint && tape test",
|
||||
"release": "npmpub"
|
||||
}
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue