Snapshot of gulpjs/gulp-util: 823★, JavaScript. [deprecated] - See https://medium.com/gulpjs/gulp-util-ca3b1f9f9ac5
Snapshot summary built from the project's own GitHub metadata — there's no written TopGit review yet. The page will update automatically when a full review is published.
WHY NO REVIEW YET
TopGit writes full reviews for the most-starred, most-requested repositories. This page is a snapshot until then — see the READ ME tab for the original README in full.
Replaces a file extension in a path. Returns the new path.
isStream(obj)
Returns true or false if an object is a stream.
isBuffer(obj)
Returns true or false if an object is a Buffer.
template(string[, data])
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.
new File(obj)
This is just vinyl
var file = new gutil.File({
base: path.join(__dirname, './fixtures/'),
cwd: __dirname,
path: path.join(__dirname, './fixtures/test.coffee')
});
noop()
Returns a stream that does nothing but pass data straight through.
// gulp should be called like this :
// $ gulp --type production
gulp.task('scripts', function() {
gulp.src('src/**/*.js')
.pipe(concat('script.js'))
.pipe(gutil.env.type === 'production' ? uglify() : gutil.noop())
.pipe(gulp.dest('dist/'));
});
buffer(cb)
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
pluginName should be the module name of your plugin
message can be a string or an existing error
By default the stack will not be shown. Set options.showStack to true if you think the stack is important for your error.
If you pass an error in as the message the stack will be pulled from that, otherwise one will be created.
Note that if you pass in a custom stack string you need to include the message along with that.
Error properties will be included in err.toString(). Can be omitted by including {showProperties: false} in the options.
These are all acceptable forms of instantiation:
var err = new gutil.PluginError('test', {
message: 'something broke'
});
var err = new gutil.PluginError({
plugin: 'test',
message: 'something broke'
});
var err = new gutil.PluginError('test', 'something broke');
var err = new gutil.PluginError('test', 'something broke', {showStack: true});
var existingError = new Error('OMG');
var err = new gutil.PluginError('test', existingError, {showStack: true});
gulp-util for enterprise
Available as part of the Tidelift Subscription
The maintainers of gulp-util and thousands of other packages are working with Tidelift to deliver commercial support and maintenance for the open source dependencies you use to build your applications. Save time, reduce risk, and improve code health, while paying the maintainers of the exact dependencies you use. Learn more.
TopGit's last sync did not record any GitHub topics for gulpjs/gulp-util. GitHub topics appear in the right sidebar of a repository page; that's the authoritative place to check.
How active is development on gulpjs/gulp-util?
The most recent commit recorded on gulpjs/gulp-util was 5.8 years ago, based on the GitHub push timestamp. The repository has 99 forks — one of the better signals of community interest.
How many stars does gulpjs/gulp-util have?
gulpjs/gulp-util has 823 GitHub stars — refresh the page for the live number, or check github.com/gulpjs/gulp-util. TopGit mirrors GitHub's count but does not claim minute-by-minute accuracy.
What language is gulpjs/gulp-util written in?
gulpjs/gulp-util is written primarily in JavaScript. GitHub's language field is based on the largest share of bytes in the default branch.
Where do I read more about gulpjs/gulp-util?
This TopGit page is a snapshot — the READ ME tab shows the project's own README content (links stripped, images preserved). The GitHub repository at github.com/gulpjs/gulp-util is the definitive source.
Read full README in the tab above.
Still deciding about gulp-util?
One click hands the question to an AI along with this page — see what it says about gulp-util.