{"id":13399294,"url":"https://github.com/gulpjs/gulp","last_synced_at":"2025-05-13T15:08:13.650Z","repository":{"id":9323520,"uuid":"11167738","full_name":"gulpjs/gulp","owner":"gulpjs","description":"A toolkit to automate \u0026 enhance your workflow","archived":false,"fork":false,"pushed_at":"2024-05-31T22:23:47.000Z","size":1118,"stargazers_count":33089,"open_issues_count":35,"forks_count":4221,"subscribers_count":1020,"default_branch":"master","last_synced_at":"2025-05-05T21:12:07.485Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"https://gulpjs.com","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/gulpjs.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":".github/SECURITY.md","support":"docs/support/for-enterprise.md","governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null},"funding":{"github":["gulpjs","phated","yocontra"],"tidelift":"npm/gulp","open_collective":"gulpjs"}},"created_at":"2013-07-04T05:26:06.000Z","updated_at":"2025-05-05T08:35:40.000Z","dependencies_parsed_at":"2024-02-15T18:03:51.244Z","dependency_job_id":"ffe852c9-431e-402c-a8c0-ca72ecb66704","html_url":"https://github.com/gulpjs/gulp","commit_stats":{"total_commits":934,"total_committers":263,"mean_commits":"3.5513307984790874","dds":0.7708779443254818,"last_synced_commit":"2fa4981a910d7bdedb758bd09868620c9bb21d54"},"previous_names":[],"tags_count":23,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gulpjs%2Fgulp","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gulpjs%2Fgulp/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gulpjs%2Fgulp/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gulpjs%2Fgulp/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/gulpjs","download_url":"https://codeload.github.com/gulpjs/gulp/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":252577020,"owners_count":21770721,"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-07-30T19:00:36.063Z","updated_at":"2025-05-05T21:12:29.810Z","avatar_url":"https://github.com/gulpjs.png","language":"JavaScript","readme":"\u003cp align=\"center\"\u003e\n  \u003ca href=\"https://gulpjs.com\"\u003e\n    \u003cimg height=\"257\" width=\"114\" src=\"https://raw.githubusercontent.com/gulpjs/artwork/master/gulp-2x.png\"\u003e\n  \u003c/a\u003e\n  \u003cp align=\"center\"\u003eThe streaming build system\u003c/p\u003e\n\u003c/p\u003e\n\n[![NPM version][npm-image]][npm-url] [![Downloads][downloads-image]][npm-url] [![Build Status][ci-image]][ci-url] [![Coveralls Status][coveralls-image]][coveralls-url]\n\n## What is gulp?\n\n- **Automation** - gulp is a toolkit that helps you automate painful or time-consuming tasks in your development workflow.\n- **Platform-agnostic** - Integrations are built into all major IDEs and people are using gulp with PHP, .NET, Node.js, Java, and other platforms.\n- **Strong Ecosystem** - Use npm modules to do anything you want + over 3000 curated plugins for streaming file transformations.\n- **Simple** - By providing only a minimal API surface, gulp is easy to learn and simple to use.\n\n## Installation\n\nFollow our [Quick Start guide][quick-start].\n\n## Roadmap\n\nFind out about all our work-in-progress and outstanding issues at https://github.com/orgs/gulpjs/projects.\n\n## Documentation\n\nCheck out the [Getting Started guide][getting-started-guide] and [API docs][api-docs] on our website!\n\n__Excuse our dust! All other docs will be behind until we get everything updated. Please open an issue if something isn't working.__\n\n## Sample `gulpfile.js`\n\nThis file will give you a taste of what gulp does.\n\n```js\nvar gulp = require('gulp');\nvar less = require('gulp-less');\nvar babel = require('gulp-babel');\nvar concat = require('gulp-concat');\nvar uglify = require('gulp-uglify');\nvar rename = require('gulp-rename');\nvar cleanCSS = require('gulp-clean-css');\nvar del = require('del');\n\nvar paths = {\n  styles: {\n    src: 'src/styles/**/*.less',\n    dest: 'assets/styles/'\n  },\n  scripts: {\n    src: 'src/scripts/**/*.js',\n    dest: 'assets/scripts/'\n  }\n};\n\n/* Not all tasks need to use streams, a gulpfile is just another node program\n * and you can use all packages available on npm, but it must return either a\n * Promise, a Stream or take a callback and call it\n */\nfunction clean() {\n  // You can use multiple globbing patterns as you would with `gulp.src`,\n  // for example if you are using del 2.0 or above, return its promise\n  return del([ 'assets' ]);\n}\n\n/*\n * Define our tasks using plain functions\n */\nfunction styles() {\n  return gulp.src(paths.styles.src)\n    .pipe(less())\n    .pipe(cleanCSS())\n    // pass in options to the stream\n    .pipe(rename({\n      basename: 'main',\n      suffix: '.min'\n    }))\n    .pipe(gulp.dest(paths.styles.dest));\n}\n\nfunction scripts() {\n  return gulp.src(paths.scripts.src, { sourcemaps: true })\n    .pipe(babel())\n    .pipe(uglify())\n    .pipe(concat('main.min.js'))\n    .pipe(gulp.dest(paths.scripts.dest));\n}\n\nfunction watch() {\n  gulp.watch(paths.scripts.src, scripts);\n  gulp.watch(paths.styles.src, styles);\n}\n\n/*\n * Specify if tasks run in series or parallel using `gulp.series` and `gulp.parallel`\n */\nvar build = gulp.series(clean, gulp.parallel(styles, scripts));\n\n/*\n * You can use CommonJS `exports` module notation to declare tasks\n */\nexports.clean = clean;\nexports.styles = styles;\nexports.scripts = scripts;\nexports.watch = watch;\nexports.build = build;\n/*\n * Define default task that can be called by just running `gulp` from cli\n */\nexports.default = build;\n```\n\n## Use latest JavaScript version in your gulpfile\n\nGulp provides a wrapper that will be loaded in your ESM code, so you can name your gulpfile as `gulpfile.mjs` or with `\"type\": \"module\"` specified in your `package.json` file.\n\nAnd here's the same sample from above written in **ESNext**.\n\n```js\nimport { src, dest, watch } from 'gulp';\nimport less from 'gulp-less';\nimport babel from 'gulp-babel';\nimport concat from 'gulp-concat';\nimport uglify from 'gulp-uglify';\nimport rename from 'gulp-rename';\nimport cleanCSS from 'gulp-clean-css';\nimport del from 'del';\n\nconst paths = {\n  styles: {\n    src: 'src/styles/**/*.less',\n    dest: 'assets/styles/'\n  },\n  scripts: {\n    src: 'src/scripts/**/*.js',\n    dest: 'assets/scripts/'\n  }\n};\n\n/*\n * For small tasks you can export arrow functions\n */\nexport const clean = () =\u003e del([ 'assets' ]);\n\n/*\n * You can also declare named functions and export them as tasks\n */\nexport function styles() {\n  return src(paths.styles.src)\n    .pipe(less())\n    .pipe(cleanCSS())\n    // pass in options to the stream\n    .pipe(rename({\n      basename: 'main',\n      suffix: '.min'\n    }))\n    .pipe(dest(paths.styles.dest));\n}\n\nexport function scripts() {\n  return src(paths.scripts.src, { sourcemaps: true })\n    .pipe(babel())\n    .pipe(uglify())\n    .pipe(concat('main.min.js'))\n    .pipe(dest(paths.scripts.dest));\n}\n\n /*\n  * You could even use `export as` to rename exported tasks\n  */\nfunction watchFiles() {\n  watch(paths.scripts.src, scripts);\n  watch(paths.styles.src, styles);\n}\nexport { watchFiles as watch };\n\nconst build = gulp.series(clean, gulp.parallel(styles, scripts));\n/*\n * Export a default task\n */\nexport default build;\n```\n\n## Incremental Builds\n\nYou can filter out unchanged files between runs of a task using\nthe `gulp.src` function's `since` option and `gulp.lastRun`:\n```js\nconst paths = {\n  ...\n  images: {\n    src: 'src/images/**/*.{jpg,jpeg,png}',\n    dest: 'build/img/'\n  }\n}\n\nfunction images() {\n  return gulp.src(paths.images.src, {since: gulp.lastRun(images)})\n    .pipe(imagemin())\n    .pipe(gulp.dest(paths.images.dest));\n}\n\nfunction watch() {\n  gulp.watch(paths.images.src, images);\n}\n```\nTask run times are saved in memory and are lost when gulp exits. It will only\nsave time during the `watch` task when running the `images` task\nfor a second time.\n\n## Want to contribute?\n\nAnyone can help make this project better - check out our [Contributing guide](/CONTRIBUTING.md)!\n\n\u003c!-- prettier-ignore-start --\u003e\n[quick-start]: https://gulpjs.com/docs/en/getting-started/quick-start\n[getting-started-guide]: https://gulpjs.com/docs/en/getting-started/quick-start\n[api-docs]: https://gulpjs.com/docs/en/api/concepts\n[esm-module]: https://github.com/standard-things/esm\n\u003c!-- prettier-ignore-end --\u003e\n\n\u003c!-- prettier-ignore-start --\u003e\n[downloads-image]: https://img.shields.io/npm/dm/gulp.svg?style=flat-square\n[npm-url]: https://www.npmjs.com/package/gulp\n[npm-image]: https://img.shields.io/npm/v/gulp.svg?style=flat-square\n\n[ci-url]: https://github.com/gulpjs/gulp/actions?query=workflow:dev\n[ci-image]: https://img.shields.io/github/actions/workflow/status/gulpjs/gulp/dev.yml?branch=master\u0026style=flat-square\n\n[coveralls-url]: https://coveralls.io/r/gulpjs/gulp\n[coveralls-image]: https://img.shields.io/coveralls/gulpjs/gulp/master.svg?style=flat-square\n\u003c!-- prettier-ignore-end --\u003e\n","funding_links":["https://github.com/sponsors/gulpjs","https://github.com/sponsors/phated","https://github.com/sponsors/yocontra","https://tidelift.com/funding/github/npm/gulp","https://opencollective.com/gulpjs"],"categories":["JavaScript","Packages","工程化","Repository","Web 后端","Please find below the links to awesome cheat-sheet and resources:","Resources","包","目录","工具","资源","Uncategorized","others","其他","Build Tools","Building","RIP","Classics","Tools","Web development tools","{{ Builder }}"],"sub_categories":["Build tools","Build Tools","Javascript:","General Resources","构建工具","构建工具/预编译","打包构建","通用资源","Uncategorized","网络服务_其他","React Components","Workflows","Test","Build","Chess :chess_pawn:"],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgulpjs%2Fgulp","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fgulpjs%2Fgulp","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgulpjs%2Fgulp/lists"}