gulpjs/gulp-util là dự án mã nguồn mở trên GitHub, viết chủ yếu bằng JavaScript, với 823 sao. [deprecated] - See https://medium.com/gulpjs/gulp-util-ca3b1f9f9ac5
Tóm tắt dựng từ metadata GitHub của chính dự án — chưa có bài review TopGit. Trang sẽ tự động cập nhật khi bài review đầy đủ được xuất bản.
VÌ SAO CHƯA CÓ REVIEW
TopGit viết bài đầy đủ cho repo có nhiều sao nhất và được yêu cầu nhiều nhất. Trang này là snapshot trong thời gian chờ — xem README gốc ở tab READ ME.
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.
Trang TopGit này là một snapshot — tab "Readme" hiển thị nguyên văn README của repo (đã bỏ link, giữ ảnh). Repo GitHub ở github.com/gulpjs/gulp-util là nguồn chính thức.
gulpjs/gulp-util có bao nhiêu sao?
gulpjs/gulp-util có 823 sao GitHub — tải lại trang để xem số mới nhất, hoặc xem trực tiếp github.com/gulpjs/gulp-util. TopGit phản chiếu số sao của GitHub nhưng không cam kết đến từng phút.
gulpjs/gulp-util có tag gì không?
Bản đồng bộ chưa ghi nhận topic GitHub nào cho gulpjs/gulp-util. GitHub topics hiển thị ở thanh bên phải trang repo — đó là nơi đáng kiểm tra nhất.
gulpjs/gulp-util còn đang phát triển không?
Commit gần nhất trên gulpjs/gulp-util là 5.8 năm trước (theo timestamp GitHub). Repo có 99 fork — một chỉ báo về mức độ quan tâm của cộng đồng.
gulpjs/gulp-util viết bằng ngôn ngữ gì?
gulpjs/gulp-util chủ yếu viết bằng JavaScript. Trường "language" của GitHub dựa trên phần lớn byte ở nhánh mặc định.
Đọc đầy đủ README ở tab phía trên.
Muốn nghe thêm một ý kiến về gulp-util?
Hỏi một AI đọc được trang này — một cú bấm là có ngay nhận định về gulp-util.