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

@nanonpm/photon

v0.19.6

Published

<h1 align="center" style="border-bottom: none;">🚀 Nano / Photon </h1> <h3 align="center">Theme-able component library</h3> <p align="center"> <a href="https://v2.vuejs.org/"> <img alt="Join the community on GitHub Discussions" src="https://img.shie

Downloads

178

Readme

Project setup

npm install

Compiles and hot-reloads for development

npm run serve

Compiles and minifies plugin for production

npm run build:lib

Run your unit tests

npm run test:unit

Lints and fixes files

npm run lint

Publishing to npm

Steps for publishing

  1. Make sure you are logged into the nanonpm npm account.
npm login
  1. Update the package version in the package.json file under the version field. We are using semantic versioning.

  2. Update the changelog file with the changes you have made.

  3. Run the deploy command - this will run 2 commands synchronously: i) npm run build:lib (builds the project) ii) npm publish (published to npm)

npm run deploy

Working in Photon

Creating new components

To create a new component and add to Photon & Storybook run:

npm run new

This will run a script prompting you for:

  1. The name of the component in Camelcase ie. MyNewComponent
  2. The section you would like MyNewComponent to sit under in the Storybookleft menu ie. Forms

It will then create a Vue component, a .stories.js file, an indes.ts (for export) and a types.ts file. These files will be populated with the basic content to allow for quick and easy scaffolding of new components. Upon running this command you should see the new component hotreloaded into Storybook.

Adding SVG Icons

When adding new SVG icons, you can use either of the following methods:

Method 1 - Manual (good for one off icons)
  1. Drop the SVG into the Icons/icons/svg folder ie. Icons/icons/svg/House.svg
  2. Create a Vue component file for the icon (use the exaxct same name) ie. Icons/icons/House.vue
  3. Add the SVG into the Vue component template
  4. Update the Icon name list export in Icons/icons/index.ts to have that icon name (this is used to output the icon in Storybook and for icon name validation).
Method 2 - Automated (WARNING - Pro level - use at your own risk!)
  1. Drop the SVG into the Icons/icons/svg folder
  2. Ensure the SVG only has the <svg>...</svg> as the top level node. Remove andy <xml ...> node
  3. Run npm run ico
  4. Look for any output errors in terminal - if there's a file name with a space, or the xml tag remains in the SVG file it won't compile properly.
  5. You can now add "Full Stack Developer" to your resume ;)

Photon v2 components.

Photon v2 components are a new system of styling photon components.

You can start the local build by running npm run sb and then navigating to the Photon v2 section of the storybook.

If you want to run it with external theme files you can run npm run sb:external and then navigate to the Photon v2 section of the storybook.

In order to get the external theme files to load you need to add the the absolute path to your branding folder for onboarding into the .env file.

Make sure it does not have a trailing slash / at the end.

When you next start the storybook application it will load and pick the theme files from your theme folders.

To learn more about the photon v2 system check the documentation bellow creating photon v2 components

Semantic versioning.

This project uses semantic versioning and semantic release to automatically publish new versions to npm.

When you merge a PR into main, semantic-release will automatically publish a new version to npm.