postcss-font-grabber
Advanced tools
Comparing version 3.0.0-beta.1 to 3.0.0
@@ -84,4 +84,9 @@ "use strict"; | ||
function getSourceCssFilePath(node) { | ||
var _a, _b; | ||
const sourceFile = (_b = (_a = node.source) === null || _a === void 0 ? void 0 : _a.input) === null || _b === void 0 ? void 0 : _b.file; | ||
var _a, _b, _c, _d; | ||
let currentNode = node; | ||
while (((_b = (_a = currentNode === null || currentNode === void 0 ? void 0 : currentNode.source) === null || _a === void 0 ? void 0 : _a.input) === null || _b === void 0 ? void 0 : _b.file) === undefined && | ||
(currentNode === null || currentNode === void 0 ? void 0 : currentNode.parent) !== undefined) { | ||
currentNode = currentNode.parent; | ||
} | ||
const sourceFile = (_d = (_c = currentNode.source) === null || _c === void 0 ? void 0 : _c.input) === null || _d === void 0 ? void 0 : _d.file; | ||
if (sourceFile === undefined) { | ||
@@ -88,0 +93,0 @@ throw new errors_1.PostcssFontGrabberError(`Can not get CSS file path of the node: "${node.toString()}"`); |
{ | ||
"name": "postcss-font-grabber", | ||
"version": "3.0.0-beta.1", | ||
"version": "3.0.0", | ||
"description": "It grabs remote font files and update your CSS, just like that.", | ||
@@ -50,2 +50,3 @@ "author": "AaronJan <aaronjan@qq.com>", | ||
"postcss": "^8.0.0", | ||
"postcss-import-url": "^6.0.0", | ||
"postcss-loader": "^5.0.0", | ||
@@ -52,0 +53,0 @@ "prettier": "^2.2.1", |
@@ -13,7 +13,5 @@ <h1 align=center> | ||
> `3.x` is under active development. | ||
A [`postcss`](https://github.com/postcss/postcss) plugin, it grabs remote font files and update your CSS, just like that. | ||
> `postcss-font-grabber` `v3.x` only works with `postcss` `v8`,for `postcss` `v7`, please take a look at the [`v2.x`](https://github.com/AaronJan/postcss-font-grabber/tree/v1.x). | ||
> `postcss-font-grabber` `v3.x` only works with `postcss` `v8`,for `postcss` `v7`, please take a look at the [`v2.x`](https://github.com/AaronJan/postcss-font-grabber/tree/v1.x) branch. | ||
@@ -24,5 +22,5 @@ ## Motivation | ||
- it may expose your internal project | ||
- font service may be slow for your users | ||
- you can do more things with local font files | ||
- It may expose your internal project | ||
- Font services could be unstable sometimes | ||
- You can do more things with local font files | ||
- GDPR compliance | ||
@@ -29,0 +27,0 @@ |
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
No v1
QualityPackage is not semver >=1. This means it is not stable and does not support ^ ranges.
Found 1 instance in 1 package
56903
560
0
20
168