{"id":21858548,"url":"https://github.com/shnam7/gulp-order3","last_synced_at":"2026-03-02T03:05:59.169Z","repository":{"id":221993318,"uuid":"752273573","full_name":"shnam7/gulp-order3","owner":"shnam7","description":"ESM type gulp plugin that re-orders the files in gulp stream.","archived":false,"fork":false,"pushed_at":"2026-01-24T19:38:18.000Z","size":155,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2026-01-25T08:32:58.417Z","etag":null,"topics":["es2015","es6","esm","gulp","gulp4","order","pipe","plugin","typescript"],"latest_commit_sha":null,"homepage":"https://github.com/shnam7/gulp-order3","language":"TypeScript","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/shnam7.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2024-02-03T14:51:43.000Z","updated_at":"2026-01-24T19:38:22.000Z","dependencies_parsed_at":null,"dependency_job_id":"9846ca0c-543e-4166-9f16-7fc872b8be7e","html_url":"https://github.com/shnam7/gulp-order3","commit_stats":null,"previous_names":["shnam7/gulp-order3"],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/shnam7/gulp-order3","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/shnam7%2Fgulp-order3","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/shnam7%2Fgulp-order3/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/shnam7%2Fgulp-order3/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/shnam7%2Fgulp-order3/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/shnam7","download_url":"https://codeload.github.com/shnam7/gulp-order3/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/shnam7%2Fgulp-order3/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29991302,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-03-02T01:47:34.672Z","status":"online","status_checked_at":"2026-03-02T02:00:07.342Z","response_time":60,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"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":["es2015","es6","esm","gulp","gulp4","order","pipe","plugin","typescript"],"created_at":"2024-11-28T02:46:21.507Z","updated_at":"2026-03-02T03:05:59.146Z","avatar_url":"https://github.com/shnam7.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# gulp-order3\n\nGulp plugin that re-orders the files in gulp stream.\n\n**Note**\n\nThis is written in Typescript referencing the earlier versions, [gulp-order](https://github.com/gulp-community/gulp-order) and [gulp-order2](https://github.com/sphela/gulp-order), to support **ESM** with gulp4.\n\nInstall with: npm/pnpm/yarn\n\n```sh\nnpm i --save-dev gulp-order3\n\n# or\n\npnpm i --save-dev gulp-order3\n\n# or\n\nyarn add gulp-order2 --dev\n```\n\n## Motivation\n\nAssume you want to concatenate the following files in the given order (with `gulp-concat`):\n\n-   `vendor/js1.js`\n-   `vendor/**/*.{coffee,js}`\n-   `app/coffee1.coffee`\n-   `app/**/*.{coffee,js}`\n\nYou'll need two streams:\n\n-   A stream that emits the JavaScript files, and\n-   a stream that emits the compiled CoffeeScript files.\n\nTo combine the streams you can pipe into another `gulp.src` or use `es.merge` (from `event-stream`). But you'll notice that in both cases the files are emitted in the same order as they come in - and this can seem very random. With `gulp-order` you can reorder the files.\n\n\n## Usage\n\nFor ESM mode:\n```ts\nimport order from 'gulp-order3'\n```\n\nFor CommonJS mode:\n```ts\nconst order = require('gulp-order3')\n```\n\n\n## API\n\n```ts\norder(patterns?: string | string[], options: Options = {}) =\u003e stream.Transform\n```\n\n### patterns\n\npattern can be a string or an array of strings containing filenames in expected sequence. It can also be `undefined`, which results in no ordering.\n\n```javascript\nimport gulp from 'gulp'\nimport order from 'gulp-order3'\nimport coffee from 'gulp-coffee'\nimport concat from 'gulp-concat'\n\ngulp.src('**/*.coffee')\n    .pipe(coffee())\n    .pipe(gulp.src('**/*.js')) // gulp.src passes through input\n    .pipe(\n        order([\n            'vendor/js1.js',\n            'vendor/**/*.js',\n            'app/coffee1.js',\n            'app/**/*.js',\n        ])\n    )\n    .pipe(concat('all.js'))\n    .pipe(gulp.dest('dist'))\n```\n\n## Options\n\n```javascript\ngulp\n  .src(\"**/*.coffee\")\n  // ...\n  .pipe(order([...], options))\n```\n\n#### `base`\n\nSome plugins might provide a wrong `base` on the Vinyl file objects. `base` allows you to set a base directory (for example: your application root directory) for all files.\n\n## Features\n\nUses [`minimatch`](https://github.com/isaacs/minimatch) for matching.\n\n## Tips\n\n-   Try to move your ordering out of your `gulp.src(...)` calls into `order(...)` instead.\n-   You can see the order of the outputted files with [`gulp-print`](https://github.com/alexgorbatchev/gulp-print)\n\n## Troubleshooting\n\nIf your files aren't being ordered in the manner that you expect, try adding the [`base`](#base) option.\n\nMake sure that your environment satisfies following requirements:\n\n-   Node: \u003e=14.13\n-   Gulp: \u003e=4.0\n\n## License\n\nMIT - Copyright © 2024 Robin Nam\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fshnam7%2Fgulp-order3","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fshnam7%2Fgulp-order3","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fshnam7%2Fgulp-order3/lists"}