Socket
Socket
Sign inDemoInstall

gulp-print

Package Overview
Dependencies
57
Maintainers
1
Versions
15
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 1.2.0 to 2.0.0

37

lib/gulp-print.js
// Generated by CoffeeScript 1.10.0
var green, log, magenta, map, path, print, ref,
slice = [].slice;
var colors, green, log, magenta, map, path, print, ref;
map = require('map-stream');
ref = require('colors'), green = ref.green, magenta = ref.magenta;
path = require('path');
log = function() {
var args, color, sig;
color = arguments[0], args = 2 <= arguments.length ? slice.call(arguments, 1) : [];
sig = color ? "[" + (green('gulp')) + "]" : "[gulp]";
args.unshift(sig);
return console.log.apply(console, args);
};
ref = require('gulp-util'), log = ref.log, colors = ref.colors;
print = function(options) {
var colors, format;
if (options == null) {
options = {};
}
if (typeof options === 'function') {
options = {
format: options
};
}
format = options.format, colors = options.colors;
if (colors == null) {
colors = true;
}
green = colors.green, magenta = colors.magenta;
print = function(format) {
if (format == null) {

@@ -40,9 +20,6 @@ format = function(filepath) {

var filepath, formatted;
filepath = path.relative(process.cwd(), file.path);
if (colors !== false) {
filepath = magenta(filepath);
}
filepath = magenta(path.relative(process.cwd(), file.path));
formatted = format(filepath);
if (formatted) {
print.log(colors, formatted);
print.log(formatted);
}

@@ -49,0 +26,0 @@ return cb(null, file);

12

package.json
{
"name": "gulp-print",
"version": "1.2.0",
"description": "Prints names of files to the console so that you can see what's in the pipe.",
"version": "2.0.0",
"description": "Prints names of files to the console so that you can see what's going through the the gulp pipe.",
"keywords": [
"gulpplugin",
"log",
"print"
"print",
"debug",
"status"
],

@@ -14,3 +16,2 @@ "homepage": "https://github.com/alexgorbatchev/gulp-print",

"name": "Alex Gorbatchev",
"email": "",
"url": "https://github.com/alexgorbatchev"

@@ -29,3 +30,3 @@ },

"map-stream": "~0.0.6",
"colors": "^1.1.2"
"gulp-util": "^3.0.6"
},

@@ -38,3 +39,2 @@ "devDependencies": {

"mocha": "^2.3.2",
"gulp-util": "^3.0.6",
"chai": "^3.2.0"

@@ -41,0 +41,0 @@ },

@@ -44,17 +44,7 @@ # gulp-print

If you want to turn colors off:
```js
gulp.task('print', function() {
gulp.src('test/*.js')
.pipe(print({colors: false}));
});
```
## API
### print(format or {format, colors})
### print(formatter)
* `format` is a callback format function that passes in filepath to be printed. Callback should return a string which will be printed.
* `colors` is a boolean which defaults to `true`.
* `formatter` is a callback format function that passes in filepath to be printed. Callback should return a string which will be printed.

@@ -61,0 +51,0 @@ ## Testing

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc