From 33d2acbbc12afecfeb48a4cbd00698e2380800ce Mon Sep 17 00:00:00 2001 From: Shannon Lal Date: Tue, 10 Oct 2017 20:08:28 -0400 Subject: [PATCH 1/5] Check in fix for selecting first --- examples/first-choise-selection-gulpfile.js | 23 +++++++++++++++++++++ package.json | 3 ++- 2 files changed, 25 insertions(+), 1 deletion(-) create mode 100644 examples/first-choise-selection-gulpfile.js diff --git a/examples/first-choise-selection-gulpfile.js b/examples/first-choise-selection-gulpfile.js new file mode 100644 index 0000000..060ab1a --- /dev/null +++ b/examples/first-choise-selection-gulpfile.js @@ -0,0 +1,23 @@ +'use strict'; + +var gulp = require( 'gulp' ); +var prompt = require('../index'); + +/** + * The following is a sample gulp file for getting the first selection from a choice + * This was put together in response to issue #27 (https://github.com/Freyskeyd/gulp-prompt/issues/27) + * + * https://github.com/SBoudrias/Inquirer.js#questions + */ +gulp.task( 'selectFirst', () => { + return gulp.src( './package.json' ) + .pipe( prompt.prompt({ + type:'list', + name:'env', + message:'Please enter selection?', + choices: ['First','Second','Third'], + pageSize:'3' + }, (res) => { + console.log('Result', res); + }) ); +}); \ No newline at end of file diff --git a/package.json b/package.json index 196964d..08f0daf 100644 --- a/package.json +++ b/package.json @@ -27,7 +27,8 @@ "inquirer": "1.2.x", "mocha": "^3.5.3", "proxyquire": "^1.8.0", - "vinyl-source-stream": "^1.1.0" + "vinyl-source-stream": "^1.1.0", + "gulp":"^3.9.1" }, "directories": { "test": "test" From 1969ebf9c440f643ba10e4c2b5f6413ab1062db5 Mon Sep 17 00:00:00 2001 From: Shannon Lal Date: Tue, 10 Oct 2017 20:09:13 -0400 Subject: [PATCH 2/5] Small code clean up --- examples/first-choise-selection-gulpfile.js | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/examples/first-choise-selection-gulpfile.js b/examples/first-choise-selection-gulpfile.js index 060ab1a..391e07a 100644 --- a/examples/first-choise-selection-gulpfile.js +++ b/examples/first-choise-selection-gulpfile.js @@ -15,8 +15,7 @@ gulp.task( 'selectFirst', () => { type:'list', name:'env', message:'Please enter selection?', - choices: ['First','Second','Third'], - pageSize:'3' + choices: ['First','Second','Third'] }, (res) => { console.log('Result', res); }) ); From cae3b02bead69779063ac251fe1d7259b2325246 Mon Sep 17 00:00:00 2001 From: Shannon Lal Date: Tue, 10 Oct 2017 20:10:12 -0400 Subject: [PATCH 3/5] Updating Change log --- CHANGELOG.md | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 8918916..974212b 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,6 +4,10 @@ All notable changes to this project will be documented in this file. The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/) and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.html). +## [0.4.0] - 2017-10-10 +### Added +- Added sample test gulp file for issue #27 @shannonlal + ## [0.4.0] - 2017-10-07 ### Added - Added lodash templating @shannonlal From 154e3f711a7c7cfdbfd619a0c01e44fc0f024712 Mon Sep 17 00:00:00 2001 From: Shannon Lal Date: Tue, 10 Oct 2017 20:12:40 -0400 Subject: [PATCH 4/5] Clean up package.json --- CHANGELOG.md | 2 +- package.json | 5 ++--- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 974212b..81fbc70 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,7 +4,7 @@ All notable changes to this project will be documented in this file. The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/) and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.html). -## [0.4.0] - 2017-10-10 +## [0.4.1] - 2017-10-10 ### Added - Added sample test gulp file for issue #27 @shannonlal diff --git a/package.json b/package.json index 08f0daf..23bdcbd 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "gulp-prompt", - "version": "0.4.0", + "version": "0.4.1", "description": "Add interactive console prompts to gulp", "main": "index.js", "scripts": { @@ -27,8 +27,7 @@ "inquirer": "1.2.x", "mocha": "^3.5.3", "proxyquire": "^1.8.0", - "vinyl-source-stream": "^1.1.0", - "gulp":"^3.9.1" + "vinyl-source-stream": "^1.1.0" }, "directories": { "test": "test" From 47279f02770186a2b1239b9bb32986e8836a24fb Mon Sep 17 00:00:00 2001 From: Shannon Lal Date: Tue, 10 Oct 2017 20:14:40 -0400 Subject: [PATCH 5/5] Code clean up --- examples/first-choise-selection-gulpfile.js | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/examples/first-choise-selection-gulpfile.js b/examples/first-choise-selection-gulpfile.js index 391e07a..8ed0919 100644 --- a/examples/first-choise-selection-gulpfile.js +++ b/examples/first-choise-selection-gulpfile.js @@ -5,9 +5,8 @@ var prompt = require('../index'); /** * The following is a sample gulp file for getting the first selection from a choice - * This was put together in response to issue #27 (https://github.com/Freyskeyd/gulp-prompt/issues/27) - * - * https://github.com/SBoudrias/Inquirer.js#questions + * This was put together in response to issue #27 + * (https://github.com/Freyskeyd/gulp-prompt/issues/27) */ gulp.task( 'selectFirst', () => { return gulp.src( './package.json' )