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

svecial

v0.0.9

Published

A list of social buttons with Svelte

Downloads

8

Readme

Svecial

npm

AppVeyor Drone (cloud) Travis (.org)

Inspirations

Svelte being one of the modern frameworks that I have hooked the most, and seeing no ongoing projects for social buttons, needing them personally, I set out to create what I needed, and at the same time share this work with other developers. Many projects have inspired me, in particular Svelma, a library of components with the "Bulma" css framework.

All my sources are available in the components in question.

I hate librairies with a lot of dependencies, so I did a librairy with just Svelte (logic) and axios (to make good requests) as dependency.

Quick Start

NPM:

npm install --save-dev svecial

YARN:

yarn install --save-dev svecial

Import components like:

import { GoogleButton } from 'svecial'

A lot of buttons depend of Bulma's framework and Font Awesome. Think to add them if you want to enjoy more this librairy!

API

Each component/button has:

  • appId: It's here where you must to put the id of the app that you created. If the component doesn't appear, it's probably because this props is missing.
  • onLoginSuccess: It's a callback if the user has been logged with success. It will return you the response of the api as parameter (depending of which button you use, Svecial can't predict informations about it).
  • onLoginFailure: It's a callback if the user has been logged with failure. It will return you the response of the api as parameter (generally the error).

Depending of which button, props are different. If we can customize easily the button, you should use color as props, else it should be theme...

More informations about the api here: https://olyno.github.io/svecial/components/

SSR

Svecial supports SSR. If you get any error when compiling, please compare your rollup.config.js file with Svecial doc's config.

Special thanks to @matyunya for taking his time to help Svecial create the SSR part

Developpement

Svecial plan

Here is a plan of what Svecial should contain:

  • [x] GoogleButton
  • [x] FacebookButton
  • [ ] TwitterButton
  • [x] DiscordButton
  • [ ] GithubButton
  • [ ] GitlabButton
  • [ ] BitbucketButton
  • [ ] ShareButton

What Svecial is supposed to be:

  • A 0 dependencies package
  • A easy and fast component to use (plug & play component)

What Svecial is not supposed to be:

  • A librairy with backend: Svecial will return needed informations in the callback of onLoginSuccess or onLoginError but that's all. You're not supposed to make your backend directly on the component, but include the composent to your backend.

Contributing

  1. Clone this repo: git clone https://github.com/Olyno/svecial.git
  2. Install dependencies: cd docs & npm i
  3. Start the automated build and automated docs: npm run dev
  4. Open url that console prints in your browser

License

Code released under GNU license.

Copyright ©, Olyno.