Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Ionicons v5 #16

Open
wants to merge 9 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 16 additions & 0 deletions .dependabot/config.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
version: 1
update_configs:
- package_manager: "javascript"
update_schedule: "daily"
directory: "/"
ignored_updates:
- match:
dependency_name: "@babel/*"
- match:
dependency_name: "babel-jest"
- match:
dependency_name: "jest"
- match:
dependency_name: "lint-staged"
- match:
dependency_name: "husky"
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -129,6 +129,8 @@ typings/
.next

### Customize
fonts/

package-lock.json
yarn.lock

Expand Down
8 changes: 4 additions & 4 deletions .npmignore
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
.editorconfig
.gitignore
.npmignore
generate-icon.js
.*

script/
test/
14 changes: 7 additions & 7 deletions babel.config.js
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
module.exports = {
presets: [
[
'@babel/preset-env',
"@babel/preset-env",
{
targets: {
node: 'current'
}
}
]
]
}
node: "current",
},
},
],
],
};
Binary file removed fonts/Ionicons.ttf
Binary file not shown.
64 changes: 0 additions & 64 deletions generate.js

This file was deleted.

14 changes: 14 additions & 0 deletions glyph.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
import map from "./fonts/Ionicons.json";

/**
* Try glyph
*
* @param {Array.<?string>} iconNames
* @return {string}
*/
export function tryGlyph(iconNames) {
const code = iconNames.reduce((prev, key) => prev || map[key], undefined);
return code ? String.fromCharCode(code) : UNKNOWN_ICON;
}

export const UNKNOWN_ICON = "";
22 changes: 0 additions & 22 deletions glyph/index.js

This file was deleted.

Loading