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

@diamondfoundry/vo-components

v0.1.3

Published

Vrai & Oro Component Library ============================

Downloads

2

Readme

Vrai & Oro Component Library

Welcome to the Vrai & Oro Component Library. This site is meant to document all of the small reusable components for vraiandoro.com

Developer Prerequisites

  • Node v8+
  • Yarn
  • Docker (optional, used for deployment only)
  • now-cli (optional, used for deployment only)

Using as an npm package

You can add this repo as a dependency to your project with this handy npm package:

yarn add @diamondfoundry/vo-components@latest

Then you can import your components like so:

import React from 'react';
import { Button } from '@diamondfoundry/vo-components';

/* ... */

render() {

    return <Button>Hello world!</Button>
}

Notes on publishing: The build is minified and the source code is not sent to the npm registry, only the minified build. This is to reduce node_modules bloat, and maintain the smallest build size possible.

Updating the npm repository

When your pull request with shiny new components has been merged into master, it is the duty of the reviewer to update the repository's version, tag the commit, and publish on npm. You can do this by running the following:

# get the latest and greated merged stuff from master 
git pull origin master 

# npm uses semver versioning rules. Update the appropriate version number here.
npm version [major|minor|patch] 

# push up your newly tagged branch to git
git push origin master 

# publish your new package on the npm registry
npm publish

Note: It's best not to use yarn for publishing on npm.

Updating Projects dependent on vo-components

After an update has been published to npm, you'll need to tell your project that uses these components that a new version of this project has been released.

  1. Get the latest version number of this project (0.1.0, 0.2.2, etc)
  2. Inside the package.json file of your project, look for "@diamondfoundry/vo-components": "^x.x.x"
  3. Update the ^x.x.x field to latest version number you found in step 1.
  4. Run yarn or npm install in your directory to clean and update this dependency in your project.

Developer Installation

  1. Clone the repository with git clone
  2. Run yarn to install all dependencies
  3. Run yarn styleguide to open up the styleguide environment for development

Additional Developer Notes

When you're creating a new component, don't forget to import it into the /src/index.js file.

/src/index.js acts as a "manifest" of all of the components inside the library. They should be exported in this file after a new component is created.

Every component needs 3 parts in order for its pull request to be accepted:

  1. Source code for the component - ComponentName.js (lol)
  2. Unit tests written - ComponentName.test.js
  3. Examples written in a markdown file - ComponentName.md

Deploying to the web

IMPORTANT: Before you deploy, make sure all of your code is pushed and merged into the master branch on GitHub, and that you have a clean working directory.

TODO: Password protect webpack-dev-server

Make sure you have the now CLI tools installed on your machine, and you're logged in as [email protected]

  1. Run yarn deploy-styleguide to deploy the styleguide to now.
  2. The site should be visible at https://styleguide.vraiandoro.com

That's it!

Unit testing

You can run unit tests with jest - linked to the npm script of yarn test

If you want to run tests as you're developing components, you can use yarn test --watch