npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

@sunrise-upc/solar-iconfont

v1.0.1

Published

Solar IconFont

Downloads

3

Readme

Solar Design System Iconfont


 
 
 

iconFont

This project was builded to serve the icons used on Solar Design System. The font will be build by the design team using icomoon app and delivered as a zip file with all the font settings.


 

Description

Intructions to update icon fonts for Solar Design system Solar Design system. The update will be needed also on the Solar web components library.


 

Setup

Clone the project from the bitbucket repo

Installation

Install dependencies :

~ npm i

Folder structure

  • fonts: contains icon-font folder, where are all the font files.
  • src: contains settings folder and other settings files.

Update Font

First (to keep all clean) replace the zip file with the new one.

  • Extract the new zip file. (this new folder must be deleted after the update is done)

  • Create a new bitbucket branch under relase folder (release/new_branch)

  • copy the new set of fonts from the extracted zip file(fonts folder content) and placed in the project icon-font folder(replace all the fonts).

  • open style.css file located on expanded Zip file, copy the last text of the url fonts/icomoon.eot? and replaced on the file \src\settings\variables\_iconfont.scss.

@font-face {
  font-family: 'icomoon';
  src:  url('fonts/icomoon.eot?xxxxxx');
  src:  url('fonts/icomoon.eot?xxxxxx#iefix') format('embedded-opentype'),
    url('fonts/icomoon.ttf?xxxxxx') format('truetype'),
    url('fonts/icomoon.woff?xxxxxx') format('woff'),
    url('fonts/icomoon.svg?xxxxxx#icomoon') format('svg');
  font-weight: normal;
  font-style: normal;
  font-display: block;
}
  • In the same file styles.css copy the new icons css rules and paste it on the file \src\settings\variables\_icons.scss

  • Delete the folder extracted from the new ZIP file.

  • run the command below to fix possible css rules.

~ npm run lint:fix
  • Commit all the changes and publish the new branch.

  • Create a new Pull Request on bitbucket.

  • After the Pull Request is acepetd and merged a new version of the font will be release/deployed through a NPM package.


 
 

Update icons on web-components

To complete the update will be needed to make some changes on the Solar web-components library.

Clone the project from the bitbucket repo and install dependencies

~ npm i

create a new bitbucket branch under 'feature' folder (feature/new_branch)

locate the file index.html under the folder src/ and update the font url with the last version

<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/@sunrise-upc/[email protected]/dist/iconFonts.css"/>


 

Icon component

  • Under the folder src/components/icon open the file icon.ts
  • Search for initIconFont() method and update the link.href with the last version
link.href = 'https://cdn.jsdelivr.net/npm/@sunrise-upc/[email protected]/dist/iconFonts.css';
  • Under the same folder src/components/icon open the file styles.scss
  • Add the new icons css rules.
.icon-new-icon::before {
  content: '\....';
}

Types

  • Under the folder src/components/icon open the file types.ts
  • Search for IconCodesEnum const
  • Add the new icon Types
export const IconCodesEnum = {
  NONE: '',
  NEW_ICON_NAME: 'new-icon-name',
  ...
  ...
}

commit all changes and publish the new branch, open a new Pull Request.

After Pull request acceptance it will be merge on the master and deployed.