diff options
author | Florian Dold <florian.dold@gmail.com> | 2019-03-27 21:01:33 +0100 |
---|---|---|
committer | Florian Dold <florian.dold@gmail.com> | 2019-03-27 21:01:33 +0100 |
commit | cc97a4dd2a967e1c2273bd5f4c5f49a5bf2e2585 (patch) | |
tree | 92c5d88706a6ffc654d1b133618d357890e7096b /node_modules/gulp-debug/index.js | |
parent | 3771b4d6b67b34c130f3a9a1a15f42deefdb2eda (diff) |
remove node_modules
Diffstat (limited to 'node_modules/gulp-debug/index.js')
-rw-r--r-- | node_modules/gulp-debug/index.js | 51 |
1 files changed, 0 insertions, 51 deletions
diff --git a/node_modules/gulp-debug/index.js b/node_modules/gulp-debug/index.js deleted file mode 100644 index 1a6c70fe0..000000000 --- a/node_modules/gulp-debug/index.js +++ /dev/null @@ -1,51 +0,0 @@ -'use strict'; -const path = require('path'); -const fancyLog = require('fancy-log'); -const through = require('through2'); -const tildify = require('tildify'); -const stringifyObject = require('stringify-object'); -const chalk = require('chalk'); -const plur = require('plur'); - -const prop = chalk.blue; - -module.exports = options => { - options = Object.assign({ - title: 'gulp-debug:', - minimal: true, - showFiles: true - }, options); - - if (process.argv.indexOf('--verbose') !== -1) { - options.verbose = true; - options.minimal = false; - options.showFiles = true; - } - - let count = 0; - - return through.obj((file, enc, cb) => { - if (options.showFiles) { - const full = - '\n' + - (file.cwd ? 'cwd: ' + prop(tildify(file.cwd)) : '') + - (file.base ? '\nbase: ' + prop(tildify(file.base)) : '') + - (file.path ? '\npath: ' + prop(tildify(file.path)) : '') + - (file.stat && options.verbose ? '\nstat: ' + prop(stringifyObject(file.stat, {indent: ' '}).replace(/[{}]/g, '').trim()) : '') + - '\n'; - - const output = options.minimal ? prop(path.relative(process.cwd(), file.path)) : full; - - module.exports._log(options.title + ' ' + output); - } - - count++; - cb(null, file); - }, cb => { - module.exports._log(options.title + ' ' + chalk.green(count + ' ' + plur('item', count))); - cb(); - }); -}; - -// Internal: Log function used by gulp-debug exposed for testing -module.exports._log = fancyLog; |