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

@nowtv/nowtv-react-toolkit

v1.3.5

Published

NowTV React ui-toolkit

Downloads

40

Readme

NowTV React Toolkit npm Circle CI

http://nowtv-react-toolkit.herokuapp.com/

This is a toolkit of NowTV React UI components.

Installation

npm install @nowtv/nowtv-react-toolkit --save

Usage

Javascript

// ES5
var Toolkit = require('nowtv-react-toolkit');

// ES6
import Toolkit from 'nowtv-react-toolkit';

CSS

You will need to require the CSS into your project which can be done in two ways:

Require it into your sass / scss file.

@import '[path-to-node_modules]/nowtv-react-toolkit/dist/toolkit';

Importing Individual ES6 Components Directly

If you're running an ES6 project and wish to only import specific components that you will compile within your project.

  1. Install the project from NPM, this is to avoid .babelrc conflicts when using github installs. You'll need to have access to scoped npm packages for @nowtv.
npm install @nowtv/nowtv-react-toolkit --save
  1. Use the @nowtv/nowtv-styleguide css

E.g.

<link rel="stylesheet" href="/node_modules/@nowtv/nowtv-styleguide/dist/toolkit.css">
  1. Make sure you're compiling nowtv-react-toolkit that lives in node_modules during your project's build.

Server E.g.

require('babel/register')({
  only: [/nowtv-react-toolkit/, /* YOUR_SOURCE, etc... */]
});

Note: The above example uses babel/register instead of a .babelrc file, as regex options are advised and easier to debug. This is also babel v5 syntax, babel v6 uses babel-register

Client E.g.

// webpack config
module: {
  loaders: [{
    test: /\.jsx?$/,
    loader: 'babel',
    include: [/nowtv-react-toolkit/, /* YOUR_SOURCE, etc... */],
    // babel version 6 style query
    query: {
      presets: ["react", "stage-1", "es2015"]
    }
  }]
}

Note: You'll need to also support class properties in your compilation due to the components use of static properties.

  1. Import the specific components directly
import Button from '@nowtv/nowtv-react-toolkit/src/components/Button/Button.react';

Note: if the component you wish to use depends on its own sass file, you will need to also compile or ignore sass files in your build.

Components

To see all the avaliable components see the docs which can be found at http://sky-uk.github.io/nowtv-react-toolkit

CDN

It's recommended to use the NOW TV CDN version of react.

The convention for libraries /libs/<library-name>/<version>

Currently only React 0.14.6 is avaliable via the links below

Webpack

When using webpack you can tell it to use the external React by adding the following to your config

externals: {
  "react": "React",
  "react-dom": "ReactDOM"
}

Contributing

contributing