Skip to content

Commit

Permalink
✨ Update icons to Font Awesome 5.3
Browse files Browse the repository at this point in the history
  • Loading branch information
gluons committed Sep 11, 2018
1 parent 4fa0757 commit 9b82167
Show file tree
Hide file tree
Showing 13 changed files with 7,434 additions and 838 deletions.
1,668 changes: 1,630 additions & 38 deletions character-list/character-list.cson

Large diffs are not rendered by default.

1,668 changes: 1,630 additions & 38 deletions character-list/character-list.json

Large diffs are not rendered by default.

1,670 changes: 1,631 additions & 39 deletions character-list/character-list.toml

Large diffs are not rendered by default.

1,194 changes: 1,194 additions & 0 deletions character-list/character-list.xml

Large diffs are not rendered by default.

796 changes: 796 additions & 0 deletions character-list/character-list.yaml

Large diffs are not rendered by default.

15 changes: 8 additions & 7 deletions gulpfile.ts
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
import gulp = require('gulp');
import json2cson = require('gulp-json2cson');
import plumber = require('gulp-plumber');
import gulp from 'gulp';
import json2cson from 'gulp-json2cson';
import plumber from 'gulp-plumber';

import del = require('del');
import yaml = require('js-yaml');
import tomlify = require('tomlify-j0.4');
import xmlBuilder = require('xmlbuilder');
import del from 'del';
import yaml from 'js-yaml';
import tomlify from 'tomlify-j0.4';
import xmlBuilder from 'xmlbuilder';

import { flatten } from 'lodash';

Expand Down Expand Up @@ -92,6 +92,7 @@ export function buildYAML() {
.pipe(gulp.dest('character-list'));
}

// tslint:disable-next-line:no-shadowed-variable
export const generate = series(cleanTS, function generate() {
let JSONSourceStr = JSON.stringify(JSONSource, null, '\t');
// Replace quote
Expand Down
12 changes: 6 additions & 6 deletions lib/icons.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { IconDefinition, IconPack } from '@fortawesome/fontawesome-common-types';
import brands from '@fortawesome/fontawesome-free-brands';
import regular from '@fortawesome/fontawesome-free-regular';
import solid from '@fortawesome/fontawesome-free-solid';
import { fab } from '@fortawesome/free-brands-svg-icons';
import { far } from '@fortawesome/free-regular-svg-icons';
import { fas } from '@fortawesome/free-solid-svg-icons';

import { IconInfo } from './types';

Expand Down Expand Up @@ -30,7 +30,7 @@ function getIcons(iconsSource: IconPack): IconInfo[] {
* @returns {IconInfo[]}
*/
export function getSolidIcons(): IconInfo[] {
return getIcons(solid);
return getIcons(fas);
}

/**
Expand All @@ -40,7 +40,7 @@ export function getSolidIcons(): IconInfo[] {
* @returns {IconInfo[]}
*/
export function getRegularIcons(): IconInfo[] {
return getIcons(regular);
return getIcons(far);
}

/**
Expand All @@ -50,5 +50,5 @@ export function getRegularIcons(): IconInfo[] {
* @returns {IconInfo[]}
*/
export function getBrandsIcons(): IconInfo[] {
return getIcons(brands);
return getIcons(fab);
}
7 changes: 3 additions & 4 deletions lib/utils.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
import { Readable } from 'stream';

import Vinyl = require('vinyl');
import Vinyl from 'vinyl';

import { getBrandsIcons, getRegularIcons, getSolidIcons } from './icons';

Expand Down Expand Up @@ -29,9 +28,9 @@ export function getSource(): IconsSource {
* @export
* @param {string} filename File name.
* @param {string} content Content.
* @returns Source stream.
* @returns {Readable} Source stream.
*/
export function createStream(filename: string, content: string) {
export function createStream(filename: string, content: string): Readable {
let src = new Readable({
objectMode: true,
read() {
Expand Down
27 changes: 15 additions & 12 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -32,20 +32,23 @@
"url": "https://github.com/gluons/Font-Awesome-Icon-Chars/issues"
},
"homepage": "https://github.com/gluons/Font-Awesome-Icon-Chars",
"dependencies": {},
"dependencies": {
"upath": "^1.0.5"
},
"devDependencies": {
"@fortawesome/fontawesome-common-types": "^0.1.2",
"@fortawesome/fontawesome-free-brands": "^5.0.7",
"@fortawesome/fontawesome-free-regular": "^5.0.6",
"@fortawesome/fontawesome-free-solid": "^5.0.6",
"@fortawesome/fontawesome-common-types": "^0.2.4",
"@fortawesome/free-brands-svg-icons": "^5.3.1",
"@fortawesome/free-regular-svg-icons": "^5.3.1",
"@fortawesome/free-solid-svg-icons": "^5.3.1",
"@types/chai": "^4.1.2",
"@types/chai-things": "^0.0.33",
"@types/cson": "^0.0.31",
"@types/del": "^3.0.0",
"@types/gulp": "^4.0.5",
"@types/js-yaml": "^3.10.1",
"@types/lodash": "^4.14.104",
"@types/mocha": "^5.0.0",
"@types/node": "^9.4.6",
"@types/node": "8",
"@types/vinyl": "^2.0.2",
"@types/xml2js": "^0.4.2",
"chai": "*",
Expand All @@ -56,16 +59,16 @@
"gulp-json2cson": "^2.0.0",
"gulp-plumber": "^1.1.0",
"js-yaml": "^3.5.5",
"lodash": "^4.17.5",
"lodash": "^4.17.10",
"mocha": "*",
"npm-run-all": "^4.1.2",
"npm-run-all": "^4.1.3",
"rimraf": "^2.6.2",
"toml": "^2.3.0",
"tomlify-j0.4": "^3.0.0",
"ts-node": "^7.0.0",
"tslint": "^5.9.1",
"tslint-config-gluons": "^2.0.0",
"typescript": "^3.0.0",
"ts-node": "^7.0.1",
"tslint": "^5.11.0",
"tslint-config-gluons": "^2.0.2",
"typescript": "^3.0.3",
"vinyl": "^2.1.0",
"xml2js": "^0.4.16",
"xmlbuilder": "^10.0.0"
Expand Down
8 changes: 4 additions & 4 deletions test/icon-count.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"all": 946,
"solid": 500,
"regular": 116,
"brands": 330
"all": 1344,
"solid": 811,
"regular": 152,
"brands": 381
}
1 change: 1 addition & 0 deletions tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
"moduleResolution": "node",
"target": "es5",
"outDir": "dist",
"esModuleInterop": true,
"declaration": true
},
"include": [
Expand Down
7 changes: 1 addition & 6 deletions tslint.json
Original file line number Diff line number Diff line change
@@ -1,8 +1,3 @@
{
"extends": "tslint-config-gluons",
"rules": {
"only-arrow-functions": false,
"no-unused-expression": false,
"no-shadowed-variable": false
}
"extends": "tslint-config-gluons"
}
Loading

0 comments on commit 9b82167

Please sign in to comment.