Skip to content

Commit 4420f55

Browse files
committed
- test: small fix to use repl.start instead of the module.exports
- docs: remove docs of exporting a function - docs: small fix on the docs - version bump
1 parent 3eec767 commit 4420f55

File tree

3 files changed

+24
-11
lines changed

3 files changed

+24
-11
lines changed

README.md

Lines changed: 22 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ var gulp = require('gulp');
1212
var repl = require('gulp-repl');
1313

1414
gulp.task('repl-start', function (cb) {
15-
gulp.repl = repl(gulp);
15+
gulp.repl = repl.start(gulp);
1616
});
1717

1818
gulp.task('repl-stop', function (cb) {
@@ -63,37 +63,39 @@ foo bar default
6363

6464
### API
6565

66-
The module exports a function that is an alias of [`start`](#gulpreplstart)
66+
The module exports a function
6767

6868
```js
69-
var gulpREPL = require('gulp-repl');
69+
var repl = require('gulp-repl');
7070
```
7171

72-
#### gulpREPL.add
72+
with the following methods
73+
74+
#### repl.add
7375

7476
```js
7577
function add(Gulp gulp)
7678
```
7779

7880
Adds the `gulp` instance tasks for the REPL and _returns_ the module again.
7981

80-
#### gulpREPL.remove
82+
#### repl.remove
8183

8284
```js
8385
function remove(Gulp gulp)
8486
```
8587

8688
Removes the `gulp` instance tasks from the REPL and _returns_ the module again.
8789

88-
#### gulpREPL.reset
90+
#### repl.reset
8991

9092
```js
9193
function reset()
9294
```
9395

9496
Removes all of the previously added instances and _returns_ the module again.
9597

96-
#### gulpREPL.get
98+
#### repl.get
9799

98100
```js
99101
function get(Gulp gulp)
@@ -106,15 +108,19 @@ _returns_
106108
- all of the stored instances if no arguments are given
107109
- metadata stored for the given `gulp` instance if was already stored
108110

109-
#### gulpREPL.start
111+
#### repl.start
110112

111113
```js
112114
function start(Gulp gulp)
113115
```
114116

115117
Takes a `gulp` instance as argument
116118

117-
Adds the `gulp` instance tasks for the REPL and starts a REPL listening on `stdin` and writing on `stdout` and _returns_ a `readline.Interface` instance. Each of the commands typed to the REPL are looked up in each of the instances given on `add`.
119+
Adds the `gulp` instance tasks for the REPL.
120+
121+
Starts a REPL listening on `stdin` and writing on `stdout`. Each of the commands typed to the REPL are looked up in each of the instances given on `add`.
122+
123+
_returns_ a `readline.Interface` instance.
118124

119125
[See node's core module `readline` documentation about the `readline.Interface`](https://nodejs.org/api/readline.html).
120126

@@ -127,6 +133,12 @@ $ npm install --save-dev gulp-repl
127133

128134
## Changelog
129135

136+
[v2.0.1][v2.0.1]:
137+
- test: small fix to use `repl.start` instead of the `module.exports`
138+
- docs: remove docs of exporting a function
139+
- docs: small fix on the docs
140+
- version bump
141+
130142
[v2.0.0][v2.0.0]:
131143
- docs: add new api docs
132144
- test: split test into files for each api method
@@ -166,6 +178,7 @@ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLI
166178
[b-version]: http://img.shields.io/npm/v/gulp-repl.svg?style=flat-square
167179
[badge-downloads]: http://img.shields.io/npm/dm/gulp-repl.svg?style=flat-square
168180

181+
[v2.0.1]: https://github.com/stringparser/gulp-repl/commit/bb9b98d7ce5cc727143d43499a36b7321765cbc2
169182

170183
[v2.0.0]: https://github.com/stringparser/gulp-repl/commit/be44875927a42d8f08dcafa7984db0bfc423e0a3
171184
[v1.1.2]: https://github.com/stringparser/gulp-repl/commit/572df8ce7cd9d4edd3a2190de021381671a295f0

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"name": "gulp-repl",
33
"author": "Javier Carrillo <stringparser@gmail.com>",
4-
"version": "2.0.0",
4+
"version": "2.0.1",
55
"license": "MIT",
66
"repository": "https://github.com/stringparser/gulp-repl",
77
"description": "a simple repl for gulp",

test/index.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ var Gulp = require('gulp').constructor;
66
var should = require('should');
77

88
var api = require('../.');
9-
var repl = api();
9+
var repl = api.start();
1010

1111
fs.readdirSync(__dirname).forEach(function (file) {
1212
if (file === 'index.js') {

0 commit comments

Comments
 (0)