1.0.1 • Published 8 years ago

gulp-just-spawn v1.0.1

Weekly downloads
1
License
MIT
Repository
github
Last release
8 years ago

gulp-just-spawn

Because there is not enough spawn/exec wrappers on the Internet

NPM version

Main driver is the fact that sometimes build scripts require just running commnds. This package is about to reduce boilerplate. Nothing fancy.

  • Requires Promise to be awialable globally
  • Designed to work with gulp Promise support
  • Wrapper around spawn, all docs from spawn is relevant

Usage

First, install gulp-just-spawn as a development dependency:

npm install --save-dev gulp-just-spawn

Then add use it in your gulpfile, like so (note these are only examples, please check the documentation for your functions for the correct way to use them):

var gulp = require('gulp');
var spawn = require('gulp-just-spawn');

// Run single command

gulp.task('deploy', () => spawn('eb', ['deploy', 'production']));

// Run multiple command sequentually

gulp.task('build:client', () => spawn([
  {cmd: 'npm', args: ['install'], options: {cwd: `${__dirname}/client`}},
  {cmd: 'npm', args: ['run', 'build'], options: {cwd: `${__dirname}/client`}}  
]));

LICENSE

MIT License