{"id":19568268,"url":"https://github.com/stringparser/gulp-repl","last_synced_at":"2025-04-27T02:32:56.063Z","repository":{"id":32481825,"uuid":"36062100","full_name":"stringparser/gulp-repl","owner":"stringparser","description":"a simple repl for gulp","archived":false,"fork":false,"pushed_at":"2017-02-12T11:17:07.000Z","size":56,"stargazers_count":7,"open_issues_count":0,"forks_count":1,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-04-20T11:19:28.931Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/stringparser.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"license","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2015-05-22T08:49:56.000Z","updated_at":"2018-10-17T19:15:15.000Z","dependencies_parsed_at":"2022-08-28T12:01:47.776Z","dependency_job_id":null,"html_url":"https://github.com/stringparser/gulp-repl","commit_stats":null,"previous_names":[],"tags_count":4,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/stringparser%2Fgulp-repl","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/stringparser%2Fgulp-repl/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/stringparser%2Fgulp-repl/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/stringparser%2Fgulp-repl/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/stringparser","download_url":"https://codeload.github.com/stringparser/gulp-repl/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":251080744,"owners_count":21533142,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-11-11T06:03:10.856Z","updated_at":"2025-04-27T02:32:55.777Z","avatar_url":"https://github.com/stringparser.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# gulp-repl [![NPM version][b-version]][x-npm] [![downloads][badge-downloads]][x-npm]\n\n[![build][b-build]][x-travis]\n\nSimple repl for gulp compatible with gulp#3.x and the future gulp#4.x.\n\n### usage\n\n```js\n// gulpfile example\nvar gulp = require('gulp');\nvar repl = require('gulp-repl');\n\ngulp.task('repl-start', function (cb) {\n  gulp.repl = repl.start(gulp);\n});\n\ngulp.task('repl-stop', function (cb) {\n  if (gulp.repl) {\n    gulp.repl.close(); // same as nodejs.org/api/readline.html#readline_rl_close\n  }\n  cb();\n});\n\n\ngulp.task('foo', function (cb) {\n  // do foo stuff\n  cb();\n});\n\ngulp.task('bar', function (cb) {\n  // do bar stuff\n  cb();\n});\n\ngulp.task('default');\n```\n\nThen, on your terminal write:\n\n```\ngulp repl-start\n```\n\nand you'll have a repl with:\n\n1. Press \u003ckbd\u003eEnter\u003c/kbd\u003e to see the prompt\n1. write the tasks you want to run\n1. Press \u003ckbd\u003eTab\u003c/kbd\u003e for completion\n\n```\n$ gulp\n... some task logging here\n(press Enter)\n\u003e (press Tab to see completion)\nfoo      bar      default\n\u003e foo bar\n[10:39:11] Starting 'foo'...\n[10:39:11] Finished 'foo' after 13 μs\n[10:39:11] Starting 'bar'...\n[10:39:11] Finished 'bar' after 5.52 μs\n```\n\n### API\n\nThe module exports a function\n\n```js\nvar repl = require('gulp-repl');\n```\n\nwith the following methods\n\n#### repl.add\n\n```js\nfunction add(Gulp gulp)\n```\n\nAdds the `gulp` instance tasks for the REPL and _returns_ the module again.\n\n#### repl.remove\n\n```js\nfunction remove(Gulp gulp)\n```\n\nRemoves the `gulp` instance tasks from the REPL and _returns_ the module again.\n\n#### repl.reset\n\n```js\nfunction reset()\n```\n\nRemoves all of the previously added instances and _returns_ the module again.\n\n#### repl.get\n\n```js\nfunction get(Gulp gulp)\n```\n\nTakes a `gulp` instance as argument\n\n_returns_\n- `null` if the `gulp` instance wasn't stored yet\n- all of the stored instances if no arguments are given\n- metadata stored for the given `gulp` instance if was already stored\n\n#### repl.start\n\n```js\nfunction start(Gulp gulp)\n```\n\nTakes a `gulp` instance as argument\n\nAdds the `gulp` instance tasks for the REPL.\n\nStarts 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`.\n\n_returns_ a `readline.Interface` instance.\n\n[See node's core module `readline` documentation about the `readline.Interface`](https://nodejs.org/api/readline.html).\n\n\n### install\n\n```\n$ npm install --save-dev gulp-repl\n```\n\n## Changelog\n\n[v2.0.1][v2.0.1]:\n- test: small fix to use `repl.start` instead of the `module.exports`\n- docs: remove docs of exporting a function\n- docs: small fix on the docs\n- version bump\n\n[v2.0.0][v2.0.0]:\n- docs: add new api docs\n- test: split test into files for each api method\n- dev: separate module into add, get, remove, reset and start\n\n[v1.1.2][v1.1.2]:\n\n- docs: add changelog\n- next_release: patch release\n- fix: `gulp.parallel` as task runner when `gulp.start` is undefined\n\n[v1.1.1][v1.1.1]:\n\n- fix: make the repl prompt after not found tasks\n- fix: line end matches\n\n[v1.1.0][v1.1.0]:\n- manage multiple gulp instances\n\n### license\n\nThe MIT License (MIT)\n\nCopyright (c) 2015-present Javier Carrillo\n\nPermission 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:\n\nThe above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.\n\nTHE 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.\n\n\u003c!-- links --\u003e\n[x-npm]: https://npmjs.com/gulp-repl\n[x-travis]: https://travis-ci.org/stringparser/gulp-repl/builds\n\n[b-build]: https://travis-ci.org/stringparser/gulp-repl.svg?branch=master\n[b-version]: http://img.shields.io/npm/v/gulp-repl.svg?style=flat-square\n[badge-downloads]: http://img.shields.io/npm/dm/gulp-repl.svg?style=flat-square\n\n[v2.0.1]: https://github.com/stringparser/gulp-repl/commit/4420f55db8f9a4887e5a8bd82976a8930e12fb50\n\n[v2.0.0]: https://github.com/stringparser/gulp-repl/commit/be44875927a42d8f08dcafa7984db0bfc423e0a3\n[v1.1.2]: https://github.com/stringparser/gulp-repl/commit/572df8ce7cd9d4edd3a2190de021381671a295f0\n[v1.1.1]: https://github.com/stringparser/gulp-repl/commit/6f4655ca1a667ca04d2a668a175055f9b4437d65\n[v1.1.0]: https://github.com/stringparser/gulp-repl/commit/71a2301233a92d68dbfd7e7a1493a38be72d0a0e\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fstringparser%2Fgulp-repl","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fstringparser%2Fgulp-repl","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fstringparser%2Fgulp-repl/lists"}