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

component-kit-builder

Package Overview
Dependencies
Maintainers
1
Versions
12
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

component-kit-builder

builds component kits using webpack require.context

  • 1.0.7
  • Source
  • npm
  • Socket score

Version published
Maintainers
1
Created
Source

travis ci status

component-kit-builder

usage

If you structure your components like this:

path/to/component
 +- component.js – basic react component
 +- redux.js – redux component wrapper
 +- relay.js – realy component wrapper

You can use component-kit-builder to build a component kit around your component for easy export and usage of your component wrapper functions.

// any file processed by webpack
import componentKitBuilder from 'component-kit-builder';
const kit = componentKitBuilder(require.context('path/to/component/directory'));

kit now has the following properties:

  • component – component exported form component.js
  • relay – relay wrapper exported from relay.js
  • redux – redux wrapper exported from redux.js
  • relay_wrapped – component wrapped by relay wrapper
  • redux_wrapped – component wrapped by redux wrapper
  • complete – component wrapped by redux and relay

By default, modules whose pre-extension filename are relay and redux are considered wrappers and included in complete and create _wrapped properties on the kit. A custom list of wrappers for component can be defined in the wrappers export in index.js.

FAQs

Package last updated on 08 Jul 2016

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