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

gulp-react-tools

v0.3.0

Published

Some basic commands for creating react components from the command line.

Downloads

6

Readme

Gulp react tools

Some basic commands for creating react components from the command line.

Installation

Run npm install gulp-react-tools. You will need gulp installed globally and locally in your project.

To configure the gulp task you will need to create a gulpfile.js (if you don't already have one in your project), and add the following:

var gulp = require('gulp');
require('gulp-react-tools')(gulp[, config]);

config is an optional object which can contain any of the following keys:

  • commandPrefix - the prefix for the gulp command. The command is in the following format gulp {PREFIX}generate --component {COMPONENT_NAME_IN_CAMEL_CASE}
  • componentDir - the directory to save new components to
  • componentStylesDir - the directory to save new component css to
  • componentTemplate - the path to the template component file, relative to gulpfile.js. This file can include tokens - see below.
  • componentStyleTemplate- the path to the template component style file, relative to gulpfile.js. This file can include tokens - see below.
  • componentName - the filename for the output component, must contain a token for the filename.
  • componentStylesName - the filename for the output component style file, must contain a token for the filename.
  • generateComponentStyles - whether to create style files for each component.
  • appendStyleImportTo - a filepath to append a style import to. False to disable.
  • appendStyleImportTemplate - the import string to append, should contain a token for the filename.

Tokens

Tokens can be used in filenames and template files. The following tokens are available:

  • {{COMPONENT}} - the upper-camel case component name. eg. "MyComponent"
  • {{COMPONENT_DASHED}} - the dashed component name. eg. "my-component"
  • {{CSS_FILE_COMMENT}} - the comment generated from appendStyleImportTemplate