Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/coingaming/moon-icons
Moon Design System icons
https://github.com/coingaming/moon-icons
Last synced: about 15 hours ago
JSON representation
Moon Design System icons
- Host: GitHub
- URL: https://github.com/coingaming/moon-icons
- Owner: coingaming
- License: mit
- Created: 2023-01-11T10:55:41.000Z (almost 2 years ago)
- Default Branch: main
- Last Pushed: 2024-04-12T15:12:01.000Z (7 months ago)
- Last Synced: 2024-04-12T22:55:43.065Z (7 months ago)
- Language: Elixir
- Size: 1.67 MB
- Stars: 1
- Watchers: 5
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# MoonIcons
Svg-icons containing library for Moon Design System
## Elixir Installation
Add to your mix.exs
```elixir
def deps do
[
{:moon_icons, git: "[email protected]:coingaming/moon-icons.git", branch: "main"}
]
end
```Than add folowing to your enpoint.ex
```elixir
plug Plug.Static,
at: "/moon_icons/",
from: :moon_icons,
gzip: true,
cache_control_for_etags: "public, max-age=86400"
```To check run your app and open e.g. http://localhost:/moon_icons/icons_new/controls-chevron-up.svg
For development purposes (e.g running bin/icons-importer.ts)
```
asdf install
npm i -g ts-node
```Now, for icons importing (from /svg folder)
## Importing icons from moom-react
```bash
rm priv/static/svgs/icons_new/*.svg
cp ../moon-icons-react/svg/*.svg priv/static/svgs/icons_new/
cd priv/static/svgs/icons_new/
# linux
# for file in ./* ; do mv "$file" "$(echo $file|sed -e 's/\([A-Z]\)/_\L\1/g' -e 's/^.\/_//')" ; done
# macos
for file in ./*.svg ; do mv "$file" "$(echo $file | sed 's/[[:upper:]]/-&/g;s/^-//' | tr '[:upper:]' '[:lower:]' | sed -e 's/^.\/-//')" ; done
cd -
rm lib_ex/moon/icons/*.ex
ts-node bin/icons-importer.ts # please note should be runned in two modes
````ts-node bin/icons-importer.ts`