Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

react-init

Package Overview
Dependencies
Maintainers
1
Versions
2
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

react-init

React init - command line interface for generating react components

  • 0.0.1
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
7
increased by75%
Maintainers
1
Weekly downloads
 
Created
Source

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.

FileDescription
.babelrcbabel settings
.editorconfigcode style configs
.eslintrclinting settings
.travis.ymlci 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)

TaskDescription
default
cleanremove generated folders
devruns everything you need and keep watching for changes
lintlint js files
buildclean and build the project
re-buildbuild changed files
testsrun the tests
watchwatch for file changes to perform needed actions

List of npm tasks (mostly used from the services)

TaskDescription
postinstall
start
lintlint js files
buildbuild the project
testrun the tests
tddrun the tests and keep watching
coveragecollect coverage from the tests
coverallssends coverage reports to coveralls
prereleaserun tests, linting and build prior to release
releasebump npm version, push to git and publish to npm

Contributing

Pull Requests welcome!

TODOs

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

Keywords

FAQs

Package last updated on 16 Dec 2015

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc