Skip to content

Commit 3f9c532

Browse files
committed
v4.6.4
1 parent 6b00cb8 commit 3f9c532

File tree

4 files changed

+15
-25
lines changed

4 files changed

+15
-25
lines changed

generate.js

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -7,25 +7,25 @@ const path = require('path')
77
* @param {any} value
88
* @return {string}
99
*/
10-
function stringify (value) {
10+
function stringify(value) {
1111
return JSON.stringify(value, null, 2)
1212
}
1313

1414
/**
1515
* @param {string} text
1616
* @return {Object.<string, number>}
1717
*/
18-
function parseGlyphs (text) {
18+
function parseGlyphs(text) {
1919
const glyph = {}
2020
const regex = /ion-([^:]+):before.+content:\s*"\\(\w+)"/gm
21-
for (let result; (result = regex.exec(text));) {
21+
for (let result; (result = regex.exec(text)); ) {
2222
glyph[result[1]] = parseInt(result[2], 16)
2323
}
2424

2525
return glyph
2626
}
2727

28-
function resolvePath (file) {
28+
function resolvePath(file) {
2929
return `${__dirname}/node_modules/ionicons/dist/${file}`
3030
}
3131

@@ -34,7 +34,7 @@ const FILES = (exports.FILES = {
3434
FONT_FILE: 'fonts/Ionicons.ttf'
3535
})
3636

37-
function generate () {
37+
function generate() {
3838
const workflows = [
3939
{
4040
file: FILES.GLYPH_MAP,

glyph/index.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ export const UNKNOWN_ICON = ''
99
* @param {function(string): string} mapper
1010
* @return {string}
1111
*/
12-
export function tryGlyph (iconNames, mapper) {
12+
export function tryGlyph(iconNames, mapper) {
1313
const code = iconNames.reduce((prev, name) => {
1414
return prev || glyphs[name in glyphs ? name : mapper(name)]
1515
}, undefined)

index.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -19,21 +19,21 @@ const getGlyph = Platform.select({
1919
})
2020

2121
class Icon extends React.PureComponent {
22-
constructor (props) {
22+
constructor(props) {
2323
super(props)
2424

2525
this._setRef = ref => {
2626
this._text = ref
2727
}
2828
}
2929

30-
setNativeProps (props) {
30+
setNativeProps(props) {
3131
if (this._text) {
3232
this._text.setNativeProps(props)
3333
}
3434
}
3535

36-
render () {
36+
render() {
3737
const {
3838
name,
3939
android,

package.json

Lines changed: 6 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,41 +1,32 @@
11
{
22
"name": "react-native-ionicons",
3-
"version": "4.6.3",
3+
"version": "4.6.4",
44
"description": "Ionic icons for React Native",
55
"main": "index.js",
66
"typings": "index.d.ts",
77
"scripts": {
8-
"prepublishOnly": "test",
8+
"prepublishOnly": "npm test",
99
"generate": "node generate",
10-
"standard": "standard --fix",
1110
"prettier": "prettier --write '**/*.{js,json,ts,md}'",
12-
"pretest": "npm run generate; npm run prettier; npm run standard",
11+
"pretest": "npm run generate; npm run prettier",
1312
"test": "jest"
1413
},
1514
"husky": {
1615
"hooks": {
17-
"pre-commit": "lint-staged"
16+
"pre-commit": "lint-staged",
17+
"pre-push": "npm test"
1818
}
1919
},
2020
"lint-staged": {
2121
"*.{js,json,ts,md}": [
2222
"prettier --write",
2323
"git add"
24-
],
25-
"*.js": [
26-
"standard --fix",
27-
"git add"
2824
]
2925
},
3026
"prettier": {
3127
"semi": false,
3228
"singleQuote": true
3329
},
34-
"standard": {
35-
"env": {
36-
"jest": true
37-
}
38-
},
3930
"repository": {
4031
"type": "git",
4132
"url": "git+https://github.com/arniu/react-native-ionicons.git"
@@ -64,8 +55,7 @@
6455
"ionicons": "^4.6.3",
6556
"jest": "^24.9.0",
6657
"lint-staged": "^9.4.2",
67-
"prettier": "^1.18.2",
68-
"standard": "^14.3.1"
58+
"prettier": "^1.18.2"
6959
},
7060
"rnpm": {
7161
"assets": [

0 commit comments

Comments
 (0)