Release 5.0.0-rc1

This commit is contained in:
robmadole
2017-09-15 15:47:51 -05:00
committed by Rob Madole
parent fceb1b8f6b
commit 733c00cf65
80 changed files with 7415 additions and 229 deletions

View File

@@ -188,13 +188,13 @@ fontawesome.parse.transform('grow-2 left-4 rotate-15')
{
"size": 18,
"x": -4,
"y": 0,
"flipX": false,
"flipY": false,
"rotate": 15
}
```
---
"y": 0,
### `fontawesome.library.add(...iconDefinitions)`
@@ -210,7 +210,7 @@ fontawesome.icon(faUser)
fontawesome.icon(brands.faFortAwesome)
```
example: using the library
Using the library
```javascript
import brands from '@fortawesome/fontawesome-free-brands'
@@ -466,7 +466,7 @@ window.FontAwesome
You can use it just like you would the Node.js package:
```javascript
faUser = FontAwesome.findIconDefinition({prefix: 'fa', iconName: 'user'})
faUser = FontAwesome.findIconDefinition({prefix: 'fas', iconName: 'user'})
FontAwesome.icon(faUser).html
```

View File

@@ -1,3 +1,7 @@
/**
* Font Awesome 5.0.0-rc1
*/
var noop = function noop() {};
var _WINDOW = {};
@@ -212,13 +216,13 @@ function getIconName(familyPrefix, cls) {
}
function htmlEscape(str) {
return str.replace(/&/g, '&amp;').replace(/"/g, '&quot;').replace(/'/g, '&#39;').replace(/</g, '&lt;').replace(/>/g, '&gt;');
return ('' + str).replace(/&/g, '&amp;').replace(/"/g, '&quot;').replace(/'/g, '&#39;').replace(/</g, '&lt;').replace(/>/g, '&gt;');
}
function joinAttributes(attributes) {
return Object.keys(attributes || {}).reduce(function (acc, attributeName) {
return acc + (attributeName + '="' + attributes[attributeName] + '" ');
}, '');
return acc + (attributeName + '="' + htmlEscape(attributes[attributeName]) + '" ');
}, '').trim();
}
function joinStyles(styles) {
@@ -523,7 +527,7 @@ function makeLayersTextAbstract(params) {
var noop$1 = function noop() {};
var p = config.measurePerformance && PERFORMANCE && PERFORMANCE.mark && PERFORMANCE.measure ? PERFORMANCE : { mark: noop$1, measure: noop$1 };
var preamble = 'FA "5.0.0-beta7"';
var preamble = 'FA "5.0.0-rc1"';
var begin = function begin(name) {
p.mark(preamble + ' ' + name + ' begins');
@@ -714,7 +718,7 @@ var build = function build() {
var iconName = shim[2];
if (prefix === 'far' && !hasRegular) {
prefix = 'fa';
prefix = 'fas';
}
acc[oldName] = { prefix: prefix, iconName: iconName };
@@ -762,7 +766,7 @@ function getCanonicalIcon(values) {
if (packs$3[cls]) {
acc.prefix = cls;
} else if (iconName) {
var shim = byOldName(iconName);
var shim = acc.prefix === 'fa' ? byOldName(iconName) : {};
acc.iconName = shim.iconName || iconName;
acc.prefix = shim.prefix || acc.prefix;

View File

@@ -1,3 +1,7 @@
/**
* Font Awesome 5.0.0-rc1
*/
(function (global, factory) {
typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory() :
typeof define === 'function' && define.amd ? define(factory) :
@@ -218,13 +222,13 @@ function getIconName(familyPrefix, cls) {
}
function htmlEscape(str) {
return str.replace(/&/g, '&amp;').replace(/"/g, '&quot;').replace(/'/g, '&#39;').replace(/</g, '&lt;').replace(/>/g, '&gt;');
return ('' + str).replace(/&/g, '&amp;').replace(/"/g, '&quot;').replace(/'/g, '&#39;').replace(/</g, '&lt;').replace(/>/g, '&gt;');
}
function joinAttributes(attributes) {
return Object.keys(attributes || {}).reduce(function (acc, attributeName) {
return acc + (attributeName + '="' + attributes[attributeName] + '" ');
}, '');
return acc + (attributeName + '="' + htmlEscape(attributes[attributeName]) + '" ');
}, '').trim();
}
function joinStyles(styles) {
@@ -529,7 +533,7 @@ function makeLayersTextAbstract(params) {
var noop$1 = function noop() {};
var p = config.measurePerformance && PERFORMANCE && PERFORMANCE.mark && PERFORMANCE.measure ? PERFORMANCE : { mark: noop$1, measure: noop$1 };
var preamble = 'FA "5.0.0-beta7"';
var preamble = 'FA "5.0.0-rc1"';
var begin = function begin(name) {
p.mark(preamble + ' ' + name + ' begins');
@@ -720,7 +724,7 @@ var build = function build() {
var iconName = shim[2];
if (prefix === 'far' && !hasRegular) {
prefix = 'fa';
prefix = 'fas';
}
acc[oldName] = { prefix: prefix, iconName: iconName };
@@ -768,7 +772,7 @@ function getCanonicalIcon(values) {
if (packs$3[cls]) {
acc.prefix = cls;
} else if (iconName) {
var shim = byOldName(iconName);
var shim = acc.prefix === 'fa' ? byOldName(iconName) : {};
acc.iconName = shim.iconName || iconName;
acc.prefix = shim.prefix || acc.prefix;

View File

@@ -4,6 +4,6 @@
"repository": "https://github.com/FortAwesome/Font-Awesome-Pro",
"jsnext:main": "index.es.js",
"license": "MIT",
"version": "0.0.14",
"version": "0.0.15",
"name": "@fortawesome/fontawesome"
}