• Stars
    star
    160
  • Rank 233,811 (Top 5 %)
  • Language
    JavaScript
  • License
    MIT License
  • Created almost 11 years ago
  • Updated over 4 years ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

exec plugin for gulp

gulp-exec status

exec plugin for gulp

Usage

var exec = require('gulp-exec');

gulp.task('reset', function() {
  var options = {
    continueOnError: false, // default = false, true means don't emit error event
    pipeStdout: false, // default = false, true means stdout is written to file.contents
  };
  var reportOptions = {
  	err: true, // default = true, false means don't write err
  	stderr: true, // default = true, false means don't write stderr
  	stdout: true // default = true, false means don't write stdout
  };
  return gulp.src('./**/**')
    .pipe(exec(file => `git checkout ${file.path} test`, options))
    .pipe(exec.reporter(reportOptions));
});

Note: If you just want to run a command, just run the command, don't use this plugin:

var exec = require('child_process').exec;

gulp.task('task', function (cb) {
  exec('ping localhost', function (err, stdout, stderr) {
    console.log(stdout);
    console.log(stderr);
    cb(err);
  });
})

gulp.src('.') does bad things. Don't do it.

Note: running and reporting are now separate, a breaking change from previous versions.

Upgrading

Version 5 and later no longer use lodash templates. Upgrade from:

.pipe(exec('git checkout <%= file.path %> <%= options.customTemplatingThing %>', options))

to:

.pipe(exec(file => `git checkout ${file.path} customTemplatingThing`, options))

Note how you can now resolve the command with an ES6 string template in the function.

LICENSE

(MIT License)

Copyright (c) 2014 Richardson & Sons, LLC

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

More Repositories

1

orchestrator

A module for sequencing and executing tasks and dependencies in maximum concurrency
JavaScript
1,226
star
2

gulp-rimraf

rimraf plugin for gulp
JavaScript
149
star
3

gulp-ignore

plugin for gulp to ignore files in the stream based on file characteristics
JavaScript
122
star
4

kubernetes-hands-on-workshop

Let's learn Docker and Kubernetes!
JavaScript
102
star
5

pretty-hrtime

process.hrtime() to words
JavaScript
66
star
6

levelup-devops-github-actions-kubernetes

Live-coding a DevOps pipeline using GitHub Actions and deploying to Kubernetes
HTML
53
star
7

git-explorer

view all DAG nodes in the .git/objects folder
TypeScript
52
star
8

docker-hands-on-workshop

C#
47
star
9

ternary-stream

A ternary stream: conditionally control the flow of stream data
JavaScript
37
star
10

sequencify

A module for sequencing tasks and dependencies
JavaScript
33
star
11

minimal-apis-aspnet

A presentation about new C# features and Minimal APIs in ASP.NET. See https://robrich.org/ for more.
HTML
31
star
12

docker-vue-and-aspnetcore

Docker Isn't All Hype; Create Robust Deployments for Vue.js and ASP.NET Core
C#
28
star
13

database-devops-with-containers

Database DevOps with Containers, the companion to https://robrich.org/slides/database-devops-with-containers/#/
HTML
25
star
14

gulp-match

Does a vinyl file match a condition?
JavaScript
23
star
15

product-catalog

Reference architecture microservice API in TypeScript, Node.js, Vue.js and MemSQL
TypeScript
20
star
16

https-aspnet-core-docker-deep-dive

Demos for https://robrich.org/slides/https-aspnet-core-docker-deep-dive/#/
C#
16
star
17

gaining-confidence-cypress-tests

The code for Gaining Confidence with Cypress Tests at https://robrich.org/slides/gaining-confidence-cypress-tests/#/
TypeScript
15
star
18

create-robust-deployments-for-spa-and-api

Companion code to "Create Robust Deployments for your SPA and API", https://robrich.org/slides/create-robust-deployments-for-spa-and-api/#/
Vue
14
star
19

database-devops-pipeline

A Database DevOps Pipeline, the companion code to https://robrich.org/slides/database-devops-pipeline/
C#
14
star
20

javascript-testing-presentation

JavaScript Testing in Node, the Browser, and CI
JavaScript
13
star
21

at-the-helm-of-kubernetes

The code for the talk at https://robrich.org/slides/at-the-helm-of-kubernetes/
HTML
12
star
22

docker-in-windows-containers

C#
8
star
23

vue-and-typescript-like-peanut-butter-and-jelly

The companion code to the talk https://robrich.org/slides/vue-and-typescript-like-peanut-butter-and-jelly/#/
Vue
7
star
24

es6-the-language-and-the-tools-workshop

Introduction to ES6: the language and the tools, a workshop
CSS
6
star
25

net-testing-xunit-moq

.NET Testing Best Practices
C#
6
star
26

web-test-all-the-things

The code for https://robrich.org/slides/web-test-all-the-things/
TypeScript
6
star
27

kubernetes-test-drive

HTML
5
star
28

ConferenceScheduler

C#
5
star
29

DevOps-Pipeline-for-.NET-Apps-and-Databases-Workshop

4
star
30

iodist

An io.js version manager for the windows folks out there.
JavaScript
3
star
31

Asynchrony_in_JavaScript

JavaScript
3
star
32

litedb-and-docker

This is a demo of using LiteDB with Docker.
C#
3
star
33

async-python

The code samples from the talk at https://robrich.org/slides/async-python/
Python
3
star
34

aspnet-dos-and-donts-for-highly-maintainable-code

JavaScript
2
star
35

TestingInNetCore

C#
2
star
36

AzureScheduler

A web app / web job for starting and stopping Azure resources via the Azure SDK
C#
2
star
37

gulp_node_example

An example gulpfile for Node projects
JavaScript
2
star
38

execify

A module for shimmimg between execution modes: streams, promises, and callbacks
JavaScript
2
star
39

great-net-microservices

This is the companion code to [Building Great .NET Microservices](https://robrich.org/slides/great-net-microservices/).
C#
2
star
40

LoggingSample

A sample of logging client- and server-side errors to the database and to email in .NET
C#
2
star
41

BetaSigmaPhi

C#
2
star
42

jupyter_getting_started

Jupyter demos showing various use-cases
Jupyter Notebook
2
star
43

FluentValidationPlayground

JavaScript
1
star
44

mocking-typescript

The code samples for the talk [Mocking in TypeScript](https://robrich.org/slides/mocking-typescript/)
TypeScript
1
star
45

githubactionsplayground

HTML
1
star
46

WelcomeToNode

CSS
1
star
47

levelup-devops-github-actions-azure-functions

Live-coding a DevOps pipeline using GitHub Actions deploying to Azure Functions consumption
C#
1
star
48

MapD

C#
1
star
49

azure-devops-aks

Level-up Your DevOps with Azure and Kubernetes
HTML
1
star
50

robrich

About Rob Richardson | rob rich
1
star
51

handlebars-sample

An example of using Handlebars in both a traditional form post model and in a single page application (SPA)
JavaScript
1
star
52

gulp_dotnet_example

An example gulpfile for Microsoft .NET projects
JavaScript
1
star
53

cactus

JavaScript
1
star
54

git-scenarios

1
star
55

vso-agent-tasks

PowerShell
1
star
56

VersionSample

Git hash into assembly on build, read it back onto the site
JavaScript
1
star
57

santas-helper

Team hack for HolidayJS 2015
JavaScript
1
star
58

XamarinExample

Creating Cross Platform Apps with Xamarin Studio
C#
1
star
59

browser-control-test-app

An app that compares Windows Forms browser controls on .NET Framework
C#
1
star