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

@lafayette-college-libraries/create-react-component

Package Overview
Dependencies
Maintainers
2
Versions
4
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@lafayette-college-libraries/create-react-component

create-react-component ======================

  • 1.0.3
  • latest
  • npm
  • Socket score

Version published
Weekly downloads
1
Maintainers
2
Weekly downloads
 
Created
Source

create-react-component

helper to generate React components. can be used programatically or with provided cli tool

usage

npm install @lafayette-college-libraries/create-react-component

createComponent(name[, opts], callback)

const createComponent = require('@lafayette-college-libraries/create-react-component')

// defaults
const opts = {
  basePath: './src',

  // `createComponent` appends an 's' to the end as a form of
  // rudimentary pluralization
  type: 'component',

  // only 'es6' and 'cjs' (CommonJS) modules are supported
  module: 'es6'
}

// per-best-practices, be sure to camel-case your component name!
createComponent('CoolComponent', opts, function (err) {
  if (err) throw err

  console.log('component created!')
})

usage: command-line

npm install -g @lafayette-college-libraries/create-react-component
usage: create-component <name(s)> [<args>]

creates a base-line React component

args

  --base-path   set the base path of the output (default: `./src`)
  --component   (default) writes component to `./src/components`
  --container   writes component to `./src/containers`
  --screen      writes component to `./src/screens`

  --es6         (default) write the component using ES6 modules
                (eg. 'import/export')
  --cjs         write the component using CommonJS modules
                (eg. 'require')

  -h, --help    this screen

FAQs

Package last updated on 05 May 2017

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