Gathering detailed insights and metrics for gulp-util
Gathering detailed insights and metrics for gulp-util
Gathering detailed insights and metrics for gulp-util
Gathering detailed insights and metrics for gulp-util
[deprecated] - See https://medium.com/gulpjs/gulp-util-ca3b1f9f9ac5
npm install gulp-util
Typescript
Module System
Min. Node Version
Node Version
NPM Version
85.4
Supply Chain
94.8
Quality
74.3
Maintenance
50
Vulnerability
99.1
License
JavaScript (100%)
Total Downloads
582,172,820
Last Day
80,382
Last Week
666,177
Last Month
3,712,749
Last Year
44,617,700
830 Stars
221 Commits
103 Forks
24 Watching
4 Branches
41 Contributors
Minified
Minified + Gzipped
Latest Version
3.0.8
Package Id
gulp-util@3.0.8
Size
5.36 kB
NPM Version
2.15.2
Node Version
0.10.41
Publised On
26 Dec 2016
Cumulative downloads
Total Downloads
Last day
-48%
80,382
Compared to previous day
Last week
-16.5%
666,177
Compared to previous week
Last month
-12.3%
3,712,749
Compared to previous month
Last year
-10.6%
44,617,700
Compared to previous year
18
Package | gulp-util |
Description | Utility functions for gulp plugins |
Node Version | >= 0.10 |
1var gutil = require('gulp-util'); 2 3gutil.log('stuff happened', 'Really it did', gutil.colors.magenta('123')); 4 5gutil.replaceExtension('file.coffee', '.js'); // file.js 6 7var opt = { 8 name: 'todd', 9 file: someGulpFile 10}; 11gutil.template('test <%= name %> <%= file.path %>', opt) // test todd /js/hi.js
Logs stuff. Already prefixed with [gulp] and all that. If you pass in multiple arguments it will join them by a space.
The default gulp coloring using gutil.colors.
values (files, module names, etc.) = cyan
numbers (times, counts, etc) = magenta
Is an instance of chalk.
Replaces a file extension in a path. Returns the new path.
Returns true or false if an object is a stream.
Returns true or false if an object is a Buffer.
This is a lodash.template function wrapper. You must pass in a valid gulp file object so it is available to the user or it will error. You can not configure any of the delimiters. Look at the lodash docs for more info.
This is just vinyl
1var file = new gutil.File({ 2 base: path.join(__dirname, './fixtures/'), 3 cwd: __dirname, 4 path: path.join(__dirname, './fixtures/test.coffee') 5});
Returns a stream that does nothing but pass data straight through.
1// gulp should be called like this : 2// $ gulp --type production 3gulp.task('scripts', function() { 4 gulp.src('src/**/*.js') 5 .pipe(concat('script.js')) 6 .pipe(gutil.env.type === 'production' ? uglify() : gutil.noop()) 7 .pipe(gulp.dest('dist/')); 8});
This is similar to es.wait but instead of buffering text into one string it buffers anything into an array (so very useful for file objects).
Returns a stream that can be piped to.
The stream will emit one data event after the stream piped to it has ended. The data will be the same array passed to the callback.
Callback is optional and receives two arguments: error and data
1gulp.src('stuff/*.js') 2 .pipe(gutil.buffer(function(err, files) { 3 4 }));
options.showStack
to true if you think the stack is important for your error.err.toString()
. Can be omitted by including {showProperties: false}
in the options.These are all acceptable forms of instantiation:
1var err = new gutil.PluginError('test', { 2 message: 'something broke' 3}); 4 5var err = new gutil.PluginError({ 6 plugin: 'test', 7 message: 'something broke' 8}); 9 10var err = new gutil.PluginError('test', 'something broke'); 11 12var err = new gutil.PluginError('test', 'something broke', {showStack: true}); 13 14var existingError = new Error('OMG'); 15var err = new gutil.PluginError('test', existingError, {showStack: true});
No vulnerabilities found.
Reason
security policy file detected
Details
Reason
no binaries found in the repo
Reason
0 existing vulnerabilities detected
Reason
license file detected
Details
Reason
Found 10/28 approved changesets -- score normalized to 3
Reason
project is archived
Details
Reason
no effort to earn an OpenSSF best practices badge detected
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 2024-12-16
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