Coder Social home page Coder Social logo

anseki / gulp-confirm Goto Github PK

View Code? Open in Web Editor NEW
9.0 4.0 1.0 27 KB

Abort or continue the flow of tasks according to an answer (with or without Enter key) to the specified question. The flow of tasks is paused, until the user responds and the next behavior is found by specified options.

License: MIT License

JavaScript 100.00%
gulpplugin confirm abort continue question pause wait prompt flow javascript

gulp-confirm's People

Contributors

anseki avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

Forkers

textpress

gulp-confirm's Issues

How to set the process exit code ?

If the tasks where aborted the process exit with code 0. How can i change that ?
This can be a problem if you have a external tool calling the script, it can't know if the process exit successfully or was aborted.

Doesn't work in Intellij WebStrom

This segment:

gulp.src(srcPathsWithoutVideos)
.pipe(gulp_confirm({
question: 'This processing requires about 10 minutes. Continue?',
input: '_key:y'
}))

causes the following problem:

stty: /dev/tty: Device not configured
<...>/node_modules/readline-sync/lib/read.sh: line 49: /dev/tty: Device not configured
stty: /dev/tty: Device not configured
<...>/node_modules/readline-sync/lib/readline-sync.js:250
if (res.error) { throw res.error; }
^

Error: The current environment doesn't support interactive reading from TTY.
stty: /dev/tty: Device not configured
<...>/node_modules/readline-sync/lib/read.sh: line 49: /dev/tty: Device not configured
stty: /dev/tty: Device not configured
at readlineExt (<...>/node_modules/readline-sync/lib/readline-sync.js:212:19)
at tryExt (<...>/node_modules/readline-sync/lib/readline-sync.js:249:15)
at <...>/node_modules/readline-sync/lib/readline-sync.js:352:15
at _readlineSync (<...>/node_modules/readline-sync/lib/readline-sync.js:422:5)
at Object.exports.keyIn (<...>/node_modules/readline-sync/lib/readline-sync.js:877:17)
at Confirm.transform (<...>/node_modules/gulp-confirm/index.js:75:34)
at DestroyableTransform._transform (<...>/node_modules/gulp-confirm/index.js:33:57)
at DestroyableTransform.Transform._read (<...>/node_modules/through2/node_modules/readable-stream/lib/_stream_transform.js:182:10)
at DestroyableTransform.Transform._write (<...>/node_modules/through2/node_modules/readable-stream/lib/_stream_transform.js:170:83)
at doWrite (<...>/node_modules/through2/node_modules/readable-stream/lib/_stream_writable.js:406:64)
at writeOrBuffer (<...>/node_modules/through2/node_modules/readable-stream/lib/_stream_writable.js:395:5)
at DestroyableTransform.Writable.write (<...>/node_modules/through2/node_modules/readable-stream/lib/_stream_writable.js:322:11)
at write (<...>/node_modules/vinyl-fs/node_modules/readable-stream/lib/_stream_readable.js:623:24)
at flow (<...>/node_modules/vinyl-fs/node_modules/readable-stream/lib/_stream_readable.js:632:7)
at DestroyableTransform.pipeOnReadable (<...>/node_modules/vinyl-fs/node_modules/readable-stream/lib/_stream_readable.js:664:5)
at emitNone (events.js:86:13)

Process finished with exit code 1

Does not work on MINGW

i'm using this in a gulp task, it work on the windows powershell but skips on git bash for windows. No errors displayed. I guess the confirm method is not triggered at all.

gulp-run 1.7.1
windows 10
git bash v 2.12.0.1

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.