New Research: Supply Chain Attack on Axios Pulls Malicious Dependency from npm.Details →
Socket
Book a DemoSign in
Socket

@xch/meteor-create-react-component

Package Overview
Dependencies
Maintainers
1
Versions
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@xch/meteor-create-react-component

Utility for generating React components in Meteor.

latest
Source
npmnpm
Version
0.1.0
Version published
Maintainers
1
Created
Source

@xch/meteor-create-react-component

This is a CLI utility for generating React components in Meteor.

Install

npm i --save-dev @xch/meteor-create-react-component

Usage

npx createNewUiComponent [options] <component-name>

Use --help flag to learn more about the options.

Simple Example

npx createNewUiComponent some-component

This creates a new component file at imports/ui/components/some-component/index.js in the Meteor app. If react-redux package is detected in the app, the component file will be renamed to component.js and a Redux container file will be created with the name index.js.

Configurable Options

You can customize the behavior of the generators with CLI options. You can also save any option under the "meteor-create-react-component" namespace in your NPM manifest (package.json) to change the default behavior across the project.

CLI options would always take priority but not all options are available.

componentsDirectory

  • Relative path from the root of your project to the single place for all of your UI components.
  • Default value: imports/ui/components.
  • Can only be configured in the manifest.

useReduxContainer

  • Set to true to create a react-redux container for the component.
  • If react-redux is detected in your project, the default value would be true, otherwise false.
  • When this is active, the component would be named component.js while the container would be named index.js.
  • Use --no-container flag to suppress this option per command.

pureComponent

  • Set to true to create a pure React component (with an arrow function) instead of a complex one (that extends React.Component).
  • Use --pure-component flag to activate this option per command.

dryRun

  • Set to true to see the results described in text without performing any changes.
  • Use --dry-run flag to activate this option per command.

License

MIT

Keywords

Meteor

FAQs

Package last updated on 12 Nov 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