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

electrum-require-components

Package Overview
Dependencies
Maintainers
3
Versions
29
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

electrum-require-components

This Electrum build tool generates a source file with a list of requires.

  • 1.7.1
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
8
decreased by-98.87%
Maintainers
3
Weekly downloads
 
Created
Source

electrum-require-components

NPM version

This tool synthesizes a source file with a list of requires.

electrum-require-components --wrap --crlf ./src widgets .component.js all.js

Produces file ./src/all.js while recursively exploring folder widgets found in the source folder ./src, looking for *.component.js.

  • The --wrap option inserts calls to Electrum.wrap().
  • The --crlf option uses CR+LF line endings (for Windows files).

Here is an example of a resulting source file with --wrap:

'use strict';
import Electrum from 'electrum';
import _CheckBox from './widgets/buttons/check-box.component.js'
import _Panel from './widgets/layout/panel.component.js';
export const CheckBox = Electrum.wrap ('CheckBox', _CheckBox);
export const Panel = Electrum.wrap ('Panel', _Panel);

And the same example without --wrap:

'use strict';
import _CheckBox from './widgets/buttons/check-box.component.js'
import _Panel from './widgets/layout/panel.component.js';
export const CheckBox = _CheckBox;
export const Panel = _Panel;

Note how check-box produces an export named CheckBox.

Companion files

If there are companion files (e.g. panel.styles.js located beside the panel.component.js file), then they will also get imported and provided to Electrum.wrap as an additional argument:

'use strict';
import Electrum from 'electrum';
import _Panel from './widgets/layout/Panel.component.js';
import _Panel$about from './widgets/layout/panel.about.js';
import _Panel$styles from './widgets/layout/panel.styles.js';
export const Panel = Electrum.wrap ('Panel', _Panel, {about: _Panel$about, styles: _Panel$styles});

Keywords

FAQs

Package last updated on 09 Jan 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