Gathering detailed insights and metrics for gulp-rename
Gathering detailed insights and metrics for gulp-rename
Gathering detailed insights and metrics for gulp-rename
Gathering detailed insights and metrics for gulp-rename
npm install gulp-rename
Typescript
Module System
Min. Node Version
Node Version
NPM Version
JavaScript (100%)
Total Downloads
0
Last Day
0
Last Week
0
Last Month
0
Last Year
0
MIT License
692 Stars
99 Commits
73 Forks
15 Watchers
1 Branches
20 Contributors
Updated on Jun 26, 2025
Latest Version
2.1.0
Package Id
gulp-rename@2.1.0
Unpacked Size
6.75 kB
Size
2.95 kB
File Count
4
NPM Version
11.4.2
Node Version
22.15.0
Published on
Jun 26, 2025
Cumulative downloads
Total Downloads
Last Day
0%
NaN
Compared to previous day
Last Week
0%
NaN
Compared to previous week
Last Month
0%
NaN
Compared to previous month
Last Year
0%
NaN
Compared to previous year
7
gulp-rename is a gulp plugin to rename files easily.
gulp-rename provides simple file renaming methods.
1var rename = require("gulp-rename"); 2 3// rename to a fixed value 4gulp.src("./src/main/text/hello.txt") 5 .pipe(rename("main/text/ciao/goodbye.md")) 6 .pipe(gulp.dest("./dist")); // ./dist/main/text/ciao/goodbye.md 7 8// rename via mutating function 9gulp.src("./src/**/hello.txt") 10 .pipe(rename(function (path) { 11 // Updates the object in-place 12 path.dirname += "/ciao"; 13 path.basename += "-goodbye"; 14 path.extname = ".md"; 15 })) 16 .pipe(gulp.dest("./dist")); // ./dist/main/text/ciao/hello-goodbye.md 17 18// rename via a map function 19gulp.src("./src/**/hello.txt") 20 .pipe(rename(function (path) { 21 // Returns a completely new object, make sure you return all keys needed! 22 return { 23 dirname: path.dirname + "/ciao", 24 basename: path.basename + "-goodbye", 25 extname: ".md" 26 }; 27 })) 28 .pipe(gulp.dest("./dist")); // ./dist/main/text/ciao/hello-goodbye.md 29 30// rename via a fixed object 31gulp.src("./src/main/text/hello.txt", { base: process.cwd() }) 32 .pipe(rename({ 33 dirname: "main/text/ciao", 34 basename: "aloha", 35 prefix: "bonjour-", 36 suffix: "-hola", 37 extname: ".md" 38 })) 39 .pipe(gulp.dest("./dist")); // ./dist/main/text/ciao/bonjour-aloha-hola.md
See test/rename.spec.js for more examples and test/path-parsing.spec.js for hairy details.
dirname
is the relative path from the base directory set by gulp.src
to the filename.
gulp.src()
uses glob-stream which sets the base to the parent of the first directory glob (*
, **
, [], or extglob). dirname
is the remaining directories or ./
if none. glob-stream versions >= 3.1.0 (used by gulp >= 3.2.2) accept a base
option, which can be used to explicitly set the base.gulp.dest()
renames the directories between process.cwd()
and dirname
(i.e. the base relative to CWD). Use dirname
to rename the directories matched by the glob or descendents of the base of option.basename
is the filename without the extension like path.basename(filename, path.extname(filename))
.extname
is the file extension including the .
like path.extname(filename)
.file
argument is provided with the whole context and original file value.Object
is returned then the passed parameter object (along with any modifications) is re-used.No vulnerabilities found.
Reason
no binaries found in the repo
Reason
no dangerous workflow patterns detected
Reason
license file detected
Details
Reason
0 existing vulnerabilities detected
Reason
Found 10/20 approved changesets -- score normalized to 5
Reason
2 commit(s) and 1 issue activity found in the last 90 days -- score normalized to 2
Reason
dependency not pinned by hash detected -- score normalized to 0
Details
Reason
detected GitHub workflow tokens with excessive permissions
Details
Reason
no effort to earn an OpenSSF best practices badge detected
Reason
security policy file not detected
Details
Reason
project is not fuzzed
Details
Reason
branch protection not enabled on development/release branches
Details
Reason
SAST tool is not run on all commits -- score normalized to 0
Details
Score
Last Scanned on 2025-07-07
The Open Source Security Foundation is a cross-industry collaboration to improve the security of open source software (OSS). The Scorecard provides security health metrics for open source projects.
Learn More