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

react-init

v0.0.1

Published

React init - command line interface for generating react components

Downloads

34

Readme

REACT INIT

Easy way to start your new react component. React-init is a cli for generating small and reusable react components.

Install it globally: npm install react-init -g

And then type: react-init Carousel

It will create a new component called Carousel. :)

This template provides everything you need to start developing and testing your new component. Including:

  • es6/7 support through babel;
  • code linting through eslint;
  • automatic code style for your editor through editorConfig
  • test frameworks using mocha, chai;
  • test coverage using isparta;
  • continuous integration using travis;
  • coverall report
  • badges
  • fast dev cycle using gulp
  • automated releases using npm

Getting started

From your terminal, type:

  • npm install react-init -g
  • react-init YourComponentName / capital case for component names
  • cd yourcomponentname // lowercase for folders
  • npm install
  • gulp dev

Ps.: npm install will take ~3 minutes. Mostly because of the many dependencies nedeed for es6/7 capabilities. I'm still investigating if I can make it faster.

For releasing on npm

  • npm run release

Settings

You will find some .dotfiles in the root of this project. Those are the settings for all the tools we are using and they are shared between npm, gulp and the services we are using. Be mindful changing it.

| File | Description | | :------------ | :----------- | | .babelrc | babel settings | | .editorconfig | code style configs | | .eslintrc | linting settings | | .travis.yml | ci settings for travis |

Setting up Continuous integration using Travis

After pushing your repo to bitbucket or github, go to travis-ci, link and enable your new repo to be built. Your next git push will trigger the build.

Setting up Test Coverage using Coveralls

Go to coveralls, get a token and enable your repo for coverage. Then go back to travis and add your token as an environment variable. Your next build will trigger coverage.

List of gulp tasks (used for development workflow)

| Task | Description | | :------------ | :----------- | | default | | clean | remove generated folders | | dev | runs everything you need and keep watching for changes | | lint | lint js files | | build | clean and build the project | | re-build | build changed files | | tests | run the tests | | watch | watch for file changes to perform needed actions |

List of npm tasks (mostly used from the services)

| Task | Description | | :------------ | :----------- | | postinstall | | start | | lint | lint js files | | build | build the project | | test | run the tests | | tdd | run the tests and keep watching | | coverage | collect coverage from the tests | | coveralls | sends coverage reports to coveralls | | prerelease | run tests, linting and build prior to release | | release | bump npm version, push to git and publish to npm |

Contributing

Pull Requests welcome!

TODOs

  • [x] tests
  • [x] coverage
  • [x] build
  • [x] task for tests
  • [x] task for tests and coverage
  • [x] task for publishing to npm
  • [ ] task for publishing to gh-pages
  • [x] editorConfig
  • [x] coveralls
  • [x] travis
  • [x] eslint
  • [x] add gulp tasks for performing everything
  • [x] create a template and generator