From 4b927c2d9016bcb4475791acb26cb60858be0348 Mon Sep 17 00:00:00 2001 From: Ruslan Abdullaev Date: Wed, 13 Nov 2019 23:18:23 +0300 Subject: [PATCH] [2.3.1] add support of Material Icons font --- CHANGELOG.md | 6 ++---- README.md | 6 ++++++ package.json | 7 +++---- test/index.js | 11 +++++++++++ yarn.lock | 13 ++++--------- 5 files changed, 26 insertions(+), 17 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 788ff81..07e1c27 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,11 +1,9 @@ -## 2.3.0 (2019-11-11) +## 2.3.1 (2019-11-13) -Added: Support of Google fonts unicode-range subsets -Fixed: refactoring the plugin script +Added: Support of Material Icons font Updated: google-fonts-complete dependency Updated: dev dependecies Updated: package.json -Updated: eslint rules ## 2.2.2 (2019-06-13) diff --git a/README.md b/README.md index e2af12e..4d0d5c9 100644 --- a/README.md +++ b/README.md @@ -32,6 +32,12 @@ body { ``` * Want to use **[Google Fonts](#foundries)**? I’ll add them for you. +* Want to use **Material Icons**? +```css +body { + font-family: "Material Icons"; +} +``` * Want to use the visitor’s **local** copy of a font? Done. * Want to **[host](#hosted)** your own fonts? Just tell me where they are, and I’ll do the rest. * Want to load a font **[async](#async)** and only use it after it has been loaded? I can do that too. diff --git a/package.json b/package.json index 766a496..51ee8ec 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "postcss-font-magician", - "version": "2.3.0", + "version": "2.3.1", "description": "PostCSS plugin that magically generates all the @font-face rules", "author": "Jonathan Neal ", "contributors": [ @@ -29,7 +29,7 @@ "dependencies": { "bootstrap-fonts-complete": "^1.0.0", "directory-fonts-complete": "^1.2.0", - "google-fonts-complete": "^2.0.0", + "google-fonts-complete": "^2.1.0", "postcss": "^7.0.21" }, "devDependencies": { @@ -39,8 +39,7 @@ "eslint-plugin-prettier": "^3.1.1", "husky": "^3.0.9", "lint-staged": "^9.4.2", - "mocha": "^6.2.2", - "prettier": "^1.18.2" + "mocha": "^6.2.2" }, "keywords": [ "postcss", diff --git a/test/index.js b/test/index.js index a5e5545..197358b 100644 --- a/test/index.js +++ b/test/index.js @@ -364,4 +364,15 @@ describe('postcss-font-magician', function() { done ); }); + + it('supports Material Icons', function(done) { + test( + 'a{font-family:"Material Icons"}b{}', + + '@font-face{font-family:"Material Icons";font-style:normal;font-weight:400;src:url(//fonts.gstatic.com/s/materialicons/v48/flUhRq6tzZclQEJ-Vdg-IuiaDsNY.eot?#) format("eot"),url(//fonts.gstatic.com/s/materialicons/v48/flUhRq6tzZclQEJ-Vdg-IuiaDsNc.woff2) format("woff2"),url(//fonts.gstatic.com/s/materialicons/v48/flUhRq6tzZclQEJ-Vdg-IuiaDsNa.woff) format("woff")}a{font-family:"Material Icons"}b{}', + + {}, + done + ); + }); }); diff --git a/yarn.lock b/yarn.lock index e78a445..3d8e792 100644 --- a/yarn.lock +++ b/yarn.lock @@ -918,10 +918,10 @@ globby@^10.0.1: merge2 "^1.2.3" slash "^3.0.0" -google-fonts-complete@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/google-fonts-complete/-/google-fonts-complete-2.0.0.tgz#d5c764fa9999e95edade159447ca13abf69c1d0e" - integrity sha512-OEvi5aC9ypmg8Nahtl3kh5EeCgzVsW3RLJxuP27/irkmE3KozqN/uNzIA8JAAg/yTr5194i/8q6iN/ibbcNhDA== +google-fonts-complete@^2.1.0: + version "2.1.0" + resolved "https://registry.yarnpkg.com/google-fonts-complete/-/google-fonts-complete-2.1.0.tgz#bb22d446290e2cda54b6fe56add406b0b17914ef" + integrity sha512-VRTGBvWdYE7NJuv/KbKp4hakK8QgsV9Z7LRAPdXmQ+cDqjZYZAMEKpBUYeO+uWsnTvMNaAtxTrFVCZrTGyb8VQ== dependencies: postcss "^7.0.18" @@ -1749,11 +1749,6 @@ prettier-linter-helpers@^1.0.0: dependencies: fast-diff "^1.1.2" -prettier@^1.18.2: - version "1.18.2" - resolved "https://registry.yarnpkg.com/prettier/-/prettier-1.18.2.tgz#6823e7c5900017b4bd3acf46fe9ac4b4d7bda9ea" - integrity sha512-OeHeMc0JhFE9idD4ZdtNibzY0+TPHSpSSb9h8FqtP+YnoZZ1sl8Vc9b1sasjfymH3SonAF4QcA2+mzHPhMvIiw== - progress@^2.0.0: version "2.0.3" resolved "https://registry.yarnpkg.com/progress/-/progress-2.0.3.tgz#7e8cf8d8f5b8f239c1bc68beb4eb78567d572ef8"