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

@xch/meteor-create-react-component

v0.1.0

Published

Utility for generating React components in Meteor.

Downloads

9

Readme

@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