generator-picantes-react

0.1.1 • Public • Published

generator-picantes-react NPM version Build Status Dependency Status Coverage percentage

Opinionated generator of React components with styles stories and test

Installation

First, install Yeoman and generator-picantes-react using npm (we assume you have pre-installed node.js).

npm install -g yo
npm install -g generator-picantes-react

Usage

Then generate your new react components:

yo picantes-react:component Name

This will generate the following files:

  • Component.js Main component file
  • Component.test.js Jest simple snapshot test
  • Component.stories.js Storybook file
  • index.js Entry point to the component that could have an apollo wrapper
  • styles.scss Stylesheet for the component

Options:

  • nostyles Do not generate styles.scss and dont wrap component with isomorphic-style-loader (default: true)
  • stateless Generate a function component instead of a class (default: true)
  • useapollo Generate a Apollo wrapper on index.js (default: false)
  • quiet Dont prompt (default: false)

Development

To test local modifications run

npm link

So the generator points to the local version

Getting To Know Yeoman

  • Yeoman has a heart of gold.
  • Yeoman is a person with feelings and opinions, but is very easy to work with.
  • Yeoman can be too opinionated at times but is easily convinced not to be.
  • Feel free to learn more about Yeoman.

License

MIT © Mauricio Saglietto

Package Sidebar

Install

npm i generator-picantes-react

Weekly Downloads

5

Version

0.1.1

License

MIT

Last publish

Collaborators

  • msaglietto