
Security News
Crates.io Implements Trusted Publishing Support
Crates.io adds Trusted Publishing support, enabling secure GitHub Actions-based crate releases without long-lived API tokens.
The gulp plugin `gulp-order` allows you to reorder a stream of files using the same syntax as of `gulp.src`.
The gulp plugin gulp-order
allows you to reorder a stream of files using the same syntax as of gulp.src
.
Assume you want to concatenate the following files in the given order (with gulp-concat
):
vendor/js1.js
vendor/**/*.{coffee,js}
app/coffee1.coffee
app/**/*.{coffee,js}
You'll need two streams:
To 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.
require("gulp-order")
returns a function that takes an array of patterns (as gulp.src
would take).
var order = require("gulp-order");
var coffee = require("gulp-coffee");
var concat = require("gulp-concat");
gulp
.src("**/*.coffee")
.pipe(coffee())
.pipe(gulp.src("**/*.js")) // gulp.src passes through input
.pipe(order([
"vendor/js1.js",
"vendor/**/*.js",
"app/coffee1.js",
"app/**/*.js"
]))
.pipe(concat("all.js"))
.pipe(gulp.dest("dist"));
gulp
.src("**/*.coffee")
// ...
.pipe(order([...], options))
base
Some 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.
Uses minimatch
for matching.
gulp.src(...)
calls into order(...)
instead.MIT - Copyright © 2014 Marcel Jackwerth
FAQs
The gulp plugin `gulp-order` allows you to reorder a stream of files using the same syntax as of `gulp.src`.
The npm package gulp-order receives a total of 14,457 weekly downloads. As such, gulp-order popularity was classified as popular.
We found that gulp-order demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 3 open source maintainers collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Crates.io adds Trusted Publishing support, enabling secure GitHub Actions-based crate releases without long-lived API tokens.
Research
/Security News
Undocumented protestware found in 28 npm packages disrupts UI for Russian-language users visiting Russian and Belarusian domains.
Research
/Security News
North Korean threat actors deploy 67 malicious npm packages using the newly discovered XORIndex malware loader.