From d1291f67551c58168af43698a359cb5ddfd266b0 Mon Sep 17 00:00:00 2001 From: Florian Dold Date: Thu, 3 Nov 2016 01:33:53 +0100 Subject: node_modules --- node_modules/gulp-util/README.md | 32 +++++++++++++------------------- 1 file changed, 13 insertions(+), 19 deletions(-) (limited to 'node_modules/gulp-util/README.md') diff --git a/node_modules/gulp-util/README.md b/node_modules/gulp-util/README.md index 8c25a4d62..a8d9b19ef 100644 --- a/node_modules/gulp-util/README.md +++ b/node_modules/gulp-util/README.md @@ -12,7 +12,7 @@ Node Version ->= 0.10 +>= 0.9 @@ -21,7 +21,7 @@ ```javascript var gutil = require('gulp-util'); -gutil.log('stuff happened', 'Really it did', gutil.colors.magenta('123')); +gutil.log('stuff happened', 'Really it did', gutil.colors.cyan('123')); gutil.beep(); gutil.replaceExtension('file.coffee', '.js'); // file.js @@ -35,18 +35,13 @@ gutil.template('test <%= name %> <%= file.path %>', opt) // test todd /js/hi.js ### log(msg...) -Logs stuff. Already prefixed with [gulp] and all that. If you pass in multiple arguments it will join them by a space. +Logs stuff. Already prefixed with [gulp] and all that. Use the right colors for values. 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 +values (files, module names, etc.) = magenta +numbers (times, counts, etc) = cyan ``` -### colors - -Is an instance of [chalk](https://github.com/sindresorhus/chalk). - ### replaceExtension(path, newExtension) Replaces a file extension in a path. Returns the new path. @@ -69,9 +64,9 @@ This is just [vinyl](https://github.com/wearefractal/vinyl) ```javascript var file = new gutil.File({ - base: path.join(__dirname, './fixtures/'), + base: join(__dirname, './fixtures/'), cwd: __dirname, - path: path.join(__dirname, './fixtures/test.coffee') + path: join(__dirname, './fixtures/test.coffee') }); ``` @@ -86,7 +81,7 @@ gulp.task('scripts', function() { gulp.src('src/**/*.js') .pipe(concat('script.js')) .pipe(gutil.env.type === 'production' ? uglify() : gutil.noop()) - .pipe(gulp.dest('dist/')); + .pipe(gulp.dest('dist/'); }); ``` @@ -102,9 +97,9 @@ Callback is optional and receives two arguments: error and data ```javascript gulp.src('stuff/*.js') - .pipe(gutil.buffer(function(err, files) { + .pipe(gutil.buffer(function(err, files){ - })); + }); ``` ## new PluginError(pluginName, message[, options]) @@ -114,7 +109,6 @@ gulp.src('stuff/*.js') - 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: @@ -136,11 +130,11 @@ var existingError = new Error('OMG'); var err = new gutil.PluginError('test', existingError, {showStack: true}); ``` -[npm-url]: https://www.npmjs.com/package/gulp-util +[npm-url]: https://npmjs.org/package/gulp-util [npm-image]: https://badge.fury.io/js/gulp-util.svg [travis-url]: https://travis-ci.org/gulpjs/gulp-util -[travis-image]: https://img.shields.io/travis/gulpjs/gulp-util.svg?branch=master +[travis-image]: https://travis-ci.org/gulpjs/gulp-util.svg?branch=master [coveralls-url]: https://coveralls.io/r/gulpjs/gulp-util -[coveralls-image]: https://img.shields.io/coveralls/gulpjs/gulp-util.svg +[coveralls-image]: https://coveralls.io/repos/gulpjs/gulp-util/badge.png [depstat-url]: https://david-dm.org/gulpjs/gulp-util [depstat-image]: https://david-dm.org/gulpjs/gulp-util.svg -- cgit v1.2.3