Commit 9f626e52 authored by bsara's avatar bsara

updated dependencies to latest versions, minor code cleanup and syntax...

updated dependencies to latest versions, minor code cleanup and syntax updates, version bump (v2.0.0)
parent 9738f687
## [v2.0.0](https://gitlab.com/bsara/gulp-fail/tree/v1.1.1) - 2020-01-03
* **[Dependency Updates]** Updated to latest version of `ansi-colors` and `through2` **(`through2` is no longer compatible with Node 0.10 & 0.12)**.
* Updated syntax to use newer keywords (`const`, `let`, etc.)
* Updated license year
## [v1.1.1](https://gitlab.com/bsara/gulp-fail/tree/v1.1.1) - 2018-08-07
* **[Dependency Updates]** Removed dependency of `gulp-util` and using individual dependencies now. Thanks [@victorhtc](https://github.com/victorhtc). ([Pull Request](https://github.com/bsara/gulp-fail/pull/2))
......
The MIT License (MIT)
Copyright (c) 2018 Brandon Sara (http://bsara.pro)
Copyright (c) 2020 Brandon Sara (https://bsara.dev)
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
......
......@@ -122,7 +122,7 @@ gulp.task('lint', function() {
The MIT License (MIT)
Copyright (c) 2018 Brandon Sara (http://bsara.pro)
Copyright (c) 2020 Brandon Sara (https://bsara.dev)
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
......
/**
* gulp-fail v1.1.2
* Copyright (c) 2018 Brandon Sara (http://bsara.pro)
* gulp-fail v2.0.0
* Copyright (c) 2020 Brandon Sara (https://bsara.dev)
* Licensed under the MIT License
*/
......@@ -10,15 +10,15 @@
// Dependencies
// -----------------
var PluginError = require('plugin-error');
var colors = require('ansi-colors');
var through = require('through2');
const PluginError = require('plugin-error');
const colors = require('ansi-colors');
const through = require('through2');
// Constants
// -----------------
var PLUGIN_NAME = 'gulp-fail';
const PLUGIN_NAME = 'gulp-fail';
......@@ -27,8 +27,8 @@ var PLUGIN_NAME = 'gulp-fail';
function gulpFail(message, failAfterCompletion) {
var shouldFail = false;
var getMessage = message;
let shouldFail = false;
let getMessage = message;
......@@ -40,12 +40,12 @@ function gulpFail(message, failAfterCompletion) {
var getError = function() {
function getError() {
return new PluginError(PLUGIN_NAME, colors.red(getMessage()), { showStack: false });
};
var checkFile = function(file, _e, cb) {
function checkFile(file, _e, cb) {
if (failAfterCompletion !== true) {
cb(getError());
return;
......@@ -57,7 +57,7 @@ function gulpFail(message, failAfterCompletion) {
};
var checkStream = function() {
function checkStream() {
if (failAfterCompletion === true && shouldFail) {
this.emit('error', getError());
return;
......@@ -66,7 +66,7 @@ function gulpFail(message, failAfterCompletion) {
};
var onError = function() {
function onError() {
this.emit('end');
};
......
This diff is collapsed.
{
"name": "gulp-fail",
"description": "A gulp plugin which forces a task to fail.",
"version": "1.1.2",
"version": "2.0.0",
"engines": {
"node": ">=4.0"
},
"license": "MIT",
"repository": "gitlab:bsara/gulp-fail.git",
"homepage": "https://gitlab.com/bsara/gulp-fail#readme",
"bugs": "https://gitlab.com/bsara/gulp-fail/issues",
"author": "Brandon Sara (http://bsara.pro)",
"author": "Brandon Sara (https://bsara.dev)",
"contributors": [
"Brian Frichette (https://github.com/bfricka)",
"Victor Hugo Teles Costa (https://github.com/victorhtc)"
......@@ -20,7 +23,7 @@
"stop"
],
"scripts": {
"test": "jshint *.js && jscs *.js",
"test": "npx jshint *.js && jscs *.js",
"bump": "npm --no-git-tag-version version patch",
"bump:major": "npm --no-git-tag-version version major",
"bump:minor": "npm --no-git-tag-version version minor",
......@@ -36,9 +39,9 @@
"README.md"
],
"dependencies": {
"ansi-colors": "^2.0.2",
"plugin-error": "^1.0.1",
"through2": "^2.0.0"
"ansi-colors": ">=4.1.1 <4.2",
"plugin-error": ">=1.0.1 <1.1",
"through2": ">=3.0.1 <3.1"
},
"devDependencies": {
"jscs": "latest",
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment