Socket
Socket
Sign inDemoInstall

component-wrapper

Package Overview
Dependencies
194
Maintainers
1
Versions
2
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    component-wrapper

Small module that spawns component.js as a child process


Version published
Maintainers
1
Created

Readme

Source

Component Wrapper

Small wrapper that calls the component.js executable using child_process.spawn.

Install

npm install component-wrapper

API

var component = require('component-wrapper');
component([args], [options]);

// Calls spawn once or multiple times depending on the length of the args array

require('child_process').spawn('/node_modules/component/bin/component', [args], [options]);

Example

component();

// This defaults to [ ['install'], ['build'] ] so this calls.

require('child_process').spawn('/node_modules/component/bin/component', [ 'install' ], null);
require('child_process').spawn('/node_modules/component/bin/component', [ 'build' ], null);

Command arguments

component([ [ '--help' ] ]);

// Calls spawn once:

require('child_process').spawn('/node_modules/component/bin/component', [ [ '--help' ] ], null);

Command arguments + options

component([ [ '--help' ], [ 'search', 'font-awesome' ] ], { cwd: __dirname });

// Calls spawn twice:

require('child_process').spawn('/node_modules/component/bin/component', [ [ '--help' ] ], { cwd: '/some/directory' });
require('child_process').spawn('/node_modules/component/bin/component', [ [ 'search', 'font-awesome' ] ], { cwd: '/some/directory' });

FAQs

Last updated on 02 Aug 2013

Did you know?

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

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc