Skip to content

Commit

Permalink
Add exec() example
Browse files Browse the repository at this point in the history
  • Loading branch information
ehmicky committed May 20, 2019
1 parent d5bac40 commit d23eb0d
Show file tree
Hide file tree
Showing 4 changed files with 31 additions and 2 deletions.
17 changes: 17 additions & 0 deletions examples/exec.gulpfile.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
// Demo of the `exec()` method.
// This file can be directly run:
// - first install `gulp-execa` and `gulp`
// - then `bash node_modules/gulp-execa/examples/exec.sh`
// An online demo is also available at:
// https://repl.it/@ehmicky/gulp-execa

'use strict'

// Ignore the following line: this is only needed for internal purposes.
require('./utils.js')

const { exec } = require('gulp-execa')

module.exports.default = async function defaultTask() {
await exec('npm --version', { verbose: true })
}
12 changes: 12 additions & 0 deletions examples/exec.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
#!/usr/bin/env bash
# Demo of the `exec()` method.
# This file can be directly run:
# - first install `gulp-execa` and `gulp`
# - then `bash node_modules/gulp-execa/examples/exec.sh`
# An online demo is also available at:
# https://repl.it/@ehmicky/gulp-execa

# Ignore the following line: this is only needed for internal purposes.
. "$(dirname "$BASH_SOURCE")/utils.sh"

gulp --gulpfile="$dir/exec.gulpfile.js"
2 changes: 1 addition & 1 deletion examples/task.gulpfile.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
// Demo of the `task()` method.
// This file can be directly run:
// - first install `gulp-execa` and `gulp`
// - then `bash node_modules/gulp-execa/examples/FILE.sh`
// - then `bash node_modules/gulp-execa/examples/task.sh`
// An online demo is also available at:
// https://repl.it/@ehmicky/gulp-execa

Expand Down
2 changes: 1 addition & 1 deletion examples/task.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
# Demo of the `task()` method.
# This file can be directly run:
# - first install `gulp-execa` and `gulp`
# - then `bash node_modules/gulp-execa/examples/FILE.sh`
# - then `bash node_modules/gulp-execa/examples/task.sh`
# An online demo is also available at:
# https://repl.it/@ehmicky/gulp-execa

Expand Down

0 comments on commit d23eb0d

Please sign in to comment.