{"id":19574693,"url":"https://github.com/stringparser/gulp-runtime","last_synced_at":"2025-04-27T06:30:33.308Z","repository":{"id":18667558,"uuid":"21875758","full_name":"stringparser/gulp-runtime","owner":"stringparser","description":"an alternate interface to vinyl-fs","archived":false,"fork":false,"pushed_at":"2017-02-11T18:37:41.000Z","size":7236,"stargazers_count":26,"open_issues_count":1,"forks_count":2,"subscribers_count":3,"default_branch":"master","last_synced_at":"2024-10-14T02:49:57.680Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","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":"2014-07-15T21:00:29.000Z","updated_at":"2023-06-14T00:31:49.000Z","dependencies_parsed_at":"2022-09-26T21:51:06.396Z","dependency_job_id":null,"html_url":"https://github.com/stringparser/gulp-runtime","commit_stats":null,"previous_names":[],"tags_count":31,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/stringparser%2Fgulp-runtime","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/stringparser%2Fgulp-runtime/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/stringparser%2Fgulp-runtime/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/stringparser%2Fgulp-runtime/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/stringparser","download_url":"https://codeload.github.com/stringparser/gulp-runtime/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":224062768,"owners_count":17249289,"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:43:27.709Z","updated_at":"2024-11-11T06:43:29.785Z","avatar_url":"https://github.com/stringparser.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"## gulp-runtime [![NPM version][badge-version]][npm] [![downloads][badge-downloads]][npm]\n\n[![build][badge-build]][travis-build]\n\n![image](https://cloud.githubusercontent.com/assets/7457705/19326735/06d81c7e-90cc-11e6-9968-7ae3631326c3.png)\n\n[documentation](docs/README.md) -\n[install](#install) -\n[setup](docs/README.md#setup) -\n[why](#why)\n\n### features\n\n - [gulp API and more](docs/API.md)\n - [customizable logging](docs/logging.md)\n - [REPL with autocomplete](docs/REPL.md)\n - [Tasks :names with :parameters](docs/task-parameters.md)\n - [pass arguments from the task runner](docs/task-arguments.md)\n\n### samples\n\n#### CLI as tasks\n\n```js\nvar gulp = require('gulp-runtime').create();\n\ngulp.task('default', ['--tasks', '--version']);\n```\n\n#### task :parameters\n\n```js\nvar gulp = require('gulp-runtime').create();\n\ngulp.task('build :src :dest', function () {\n  return gulp.src(this.params.src)\n    // transform, compress, etc.\n    .pipe(gulp.dest(this.params.dest));\n});\n\ngulp.task('default',\n  gulp.parallel('build src/**/*.js build')\n);\n```\n\n#### passing arguments\n\n```js\nvar gulp = require('gulp-runtime').create();\n\ngulp.task('read src', function (callback, src, dest) {\n  dest = path.join(dest, new Date().toISOString());\n  console.log('from', src, 'to', dest);\n\n  var stream = gulp.src(src);\n\n  callback(null, stream, dest);\n});\n\ngulp.task('write', function (done, stream, dest) {\n  return stream.pipe(gulp.dest(dest));\n});\n\n// the default takes any arguments after '--' from the terminal\ngulp.task('default',\n  gulp.series('read src', 'write')\n);\n```\n\nwrite\n\n```js\nnode gulplfile.js -- src/**/*.js build\n```\n\nand arguments after `--` will be passed to the `default` task.\n\n#### functions as tasks\n\nJust as gulp#4.0\n\n```js\nvar gulp = require('gulp-runtime').create();\n\nfunction build (done, src, dest) {\n  console.log('from', src, 'to', dest);\n  return gulp.src(src)\n    // some build step\n    .pipe(gulp.dest(dest));\n}\n\nfunction minify (done, src, dest) {\n  return gulp.src(src)\n    // minify\n    .pipe(gulp.dest(dest));\n}\n\ngulp.task('default',\n  gulp.series(build, minify)\n);\n```\n\n#### split builds in instances\n\n```js\nvar styles = require('gulp-runtime').create();\n\nstyles.task('less', function (done, sources, dest) {\n  var less = require('gulp-less');\n  var options = require('./build/options');\n\n  return gulp.src(sources)\n    .pipe(less(options.less))\n    .pipe(gulp.dest(dest));\n});\n\nstyles.task('default', ['less']);\n\nexports = module.exports = styles;\n```\n\n#### a REPL after `default` has finished\n\n```js\nvar gulp = require('gulp-runtime').create({ repl: true });\n\ngulp.task(':number', function (done) {\n  setTimeout(done, 100);\n});\n\ngulp.task('default', ['one', 'two']);\n```\n\ngo to the terminal and do\n\n```sh\nnode gulpfile.js\n```\n\nwhich will run a REPL with the tasks defined.\n\n### install\n\nWith [npm][npm]\n\n```sh\nnpm install --save-dev gulp-runtime\n```\n\n### why\n\nSoon after I started to use `gulp` it came to mind\n\n\u003e I want a REPL for this\n\nMainly because a REPL is the closest to `define and use as you like`. If that was possible then writing task names in this REPL will run them just as doing the same from the command line.\n\nThen I realized that what I really liked from `gulp` is the way you can bundle and compose async functions and how its this done under the hood. For that I had to try to do it by myself.\n\nThe above has lead to [gulp-repl][gulp-repl], [parth][parth], [runtime][runtime] and finally [gulp-runtime][npm].\n\nSo yeah, it got out of hand :D.\n\nBut well oh well, here we are.\n\n### license\n\n[![License][badge-license]][license]\n\n\u003c!-- links --\u003e\n\n[npm]: http://npmjs.com/gulp-runtime\n[parth]: http://npmjs.com/parth\n[license]: http://opensource.org/licenses/MIT\n[vinylFs]: http://npmjs.com/vinyl-fs\n[runtime]: http://github.com/stringparser/runtime\n[gulp-repl]: http://github.com/stringparser/gulp-repl\n[travis-build]: http://travis-ci.org/stringparser/gulp-runtime/builds\n\n[badge-build]: http://img.shields.io/travis/stringparser/gulp-runtime/master.svg?style=flat-square\n[badge-version]: http://img.shields.io/npm/v/gulp-runtime.svg?style=flat-square\n[badge-license]: http://img.shields.io/npm/l/gulp-runtime.svg?style=flat-square\n[badge-downloads]: http://img.shields.io/npm/dm/gulp-runtime.svg?style=flat-square\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fstringparser%2Fgulp-runtime","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fstringparser%2Fgulp-runtime","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fstringparser%2Fgulp-runtime/lists"}