🚀 Big News: Socket Acquires Coana to Bring Reachability Analysis to Every Appsec Team.Learn more
Socket
Book a DemoInstallSign in
Socket

component-wrapper

Package Overview
Dependencies
Maintainers
1
Versions
2
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

component-wrapper

Small module that spawns component.js as a child process

1.0.1
latest
npm
Version published
Maintainers
1
Created
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

Package last updated on 02 Aug 2013

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