Skip to content

Commit

Permalink
Release 5.1.0
Browse files Browse the repository at this point in the history
  • Loading branch information
actions-user committed Jun 6, 2021
2 parents 1f2c946 + a9a5fc8 commit d8906d6
Show file tree
Hide file tree
Showing 6 changed files with 40 additions and 20 deletions.
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
DISCLAIMER.md

# Dependency directories
node_modules/

Expand Down
11 changes: 10 additions & 1 deletion .npmignore
Original file line number Diff line number Diff line change
@@ -1,4 +1,13 @@
# Keep only the icon font files
# Ignore all files in root
/*
# Except the ones we want to publish
!/font/
!package.json
!DISCLAIMER.md
!README.md
!LICENSE.md
!index.js

# But exclude the .svg font file, as per:
# https://github.com/simple-icons/simple-icons-font/pull/45#discussion_r539539508
/font/SimpleIcons.svg
21 changes: 15 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,13 +15,22 @@ Free SVG icon font for popular brands. See them all on one page at <a href="http

## Setup

> :information_source: We ask that all users read our [legal disclaimer](https://github.com/simple-icons/simple-icons/blob/master/DISCLAIMER.md) before using icons from Simple Icons.
### CDN Setup

The font can be served from a CDN such as [JSDelivr][jsdelivr-link] or [Unpkg][unpkg-link]. Simply use the `simple-icons-font` NPM package and specify a version in the URL like the following:

#### JSDeliver

```html
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/simple-icons-font@v5/font/simple-icons.min.css" type="text/css">
```

#### Unpkg

```html
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/simple-icons-font@v4/font/simple-icons.min.css" type="text/css">
<link rel="stylesheet" href="https://unpkg.com/simple-icons-font@4/font/simple-icons.min.css" type="text/css">
<link rel="stylesheet" href="https://unpkg.com/simple-icons-font@v5/font/simple-icons.min.css" type="text/css">
```

These examples use the latest major version. This means you won't receive any updates following the next major release. You can use `@latest` instead to receive updates indefinitely. However this may cause an icon to disappear if it has been removed in the latest version.
Expand All @@ -30,8 +39,8 @@ These examples use the latest major version. This means you won't receive any up

The font is also available through our npm package. To install, simply run:

```
$ npm install simple-icons-font
```shell
npm install simple-icons-font
```

After installation, the icons font and stylesheet font can be found in `node_modules/simple-icons-font/font`. You can use your favorite bundling tool to include them into your project.
Expand All @@ -40,8 +49,8 @@ After installation, the icons font and stylesheet font can be found in `node_mod

The font is also available through our Packagist package. To install, simply run:

```
$ composer require simple-icons-font
```shell
composer require simple-icons-font
```

The font can then be used by linking to the stylesheet in your HTML or PHP file (see example in [Manual Setup](#manual-setup)).
Expand Down
14 changes: 7 additions & 7 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

8 changes: 4 additions & 4 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "simple-icons-font",
"version": "5.0.0",
"version": "5.1.0",
"description": "Icon font generated from https://simpleicons.org",
"homepage": "https://www.simpleicons.org",
"keywords": [
Expand All @@ -22,10 +22,10 @@
"scripts": {
"build": "node scripts/build.js",
"build:testpage": "npm run build && node scripts/build-testpage.js",
"clean": "rm -rf font/ preview/testpage.html screenshot.png",
"clean": "rm -rf font/ preview/testpage.html DISCLAIMER.md screenshot.png",
"format": "prettier --write --single-quote .",
"lint": "prettier --check --single-quote .",
"prepublishOnly": "npm run build",
"prepublishOnly": "npm run build && cp node_modules/simple-icons/DISCLAIMER.md ./",
"prepare": "is-ci || husky install",
"postpublish": "npm run clean",
"test": "npm run build:testpage && anywhere -h localhost -d . -f /preview/testpage.html"
Expand All @@ -41,7 +41,7 @@
"punycode": "2.1.1",
"puppeteer": "9.1.1",
"semver": "7.3.5",
"simple-icons": "5.0.0",
"simple-icons": "5.1.0",
"svg2ttf": "5.2.0",
"svgpath": "2.3.1",
"ttf2eot": "2.0.0",
Expand Down
4 changes: 2 additions & 2 deletions scripts/build.js
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ function buildSimpleIconsSvgFontFile() {
let startUnicode = 0xea01;
let glyphsContent = '';

for (let iconTitle in simpleIcons) {
for (let iconSlug in simpleIcons) {
let nextUnicode = ucs2.decode(String.fromCodePoint(startUnicode++));
let unicodeString = nextUnicode
.map((point) => `&#x${point.toString(16).toUpperCase()};`)
Expand All @@ -56,7 +56,7 @@ function buildSimpleIconsSvgFontFile() {
throw Error(`Unicodes must be unique. Found '${unicodeString}' repeated`);
}

const icon = simpleIcons[iconTitle];
const icon = simpleIcons.Get(iconSlug);
const verticalTransformedPath = SVGPath(icon.path)
.scale(50, -50)
.round(6)
Expand Down

0 comments on commit d8906d6

Please sign in to comment.