npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

@petervanderdoes/gulp-isort

v1.1.0

Published

Gulp plugin for Isort.

Downloads

9

Readme

Gulp Isort

npm downloads js-semistandard-style license dependencies dev-dependencies

Gulp task for isort.

Installation

Install

npm install @petervanderdoes/gulp-isort --save-dev

This plugin requires isort to be installed.

From a terminal:

python -m pip install isort

Usage

var gulp = require('gulp');
var gulpIsort = require('gulp-isort');

gulp.task('isort', function () {
  return gulp.src('**/*')
    .pipe(gulpIsort())
    .pipe(gulpIsort.reporter())
    .pipe(gulpIsort.failAfterError());
});

API

gulpIsort.reporter(format)

format

Type: String

The format of the report. The plugin comes with three build-in options:

  • default
  • fancy
  • verbose

Default is default

default

Only display errors.

Example:

stuff
  .pipe(gulpIsort())
  .pipe(gulpIsort.reporter())

Example Output:

manage.py:  Imports are incorrectly sorted.
wger/exercises/views/categories.py:  Imports are incorrectly sorted.
wger/exercises/views/comments.py:  Imports are incorrectly sorted.
wger/exercises/views/equipment.py:  Imports are incorrectly sorted.
fancy

A colored output which displays error only. If a file has multiple errors, the filename is only displayed on the first error.

Example:

stuff
  .pipe(gulpIsort())
  .pipe(gulpIsort.reporter('fancy'))

Example output:

manage.py:  Imports are incorrectly sorted.
wger/exercises/views/categories.py:  Imports are incorrectly sorted.
wger/exercises/views/comments.py:  Imports are incorrectly sorted.
wger/exercises/views/equipment.py:  Imports are incorrectly sorted.
verbose

Displays all messages from isort but gulp only stops linting if there are isort errors.

Example:

stuff
  .pipe(gulpIsort())
  .pipe(gulpIsort.reporter('verbose'))

Example output:

manage.py:  Imports are incorrectly sorted.
wger/exercises/views/categories.py:  Imports are incorrectly sorted.
wger/exercises/views/comments.py:  Imports are incorrectly sorted.
wger/exercises/views/equipment.py:  Imports are incorrectly sorted.

gulpIsort.failAfterError()

Stop a task/stream if a gulpIsort error has been reported for any file.

gulp.task('lint-python', function () {
  return gulp.src('**/*py')
    .pipe(gulpIsort())
    .pipe(gulpIsort.failAfterError());
});

Result

Type: Object

The following properties are set to the result object:

  result.gulpIsort.success = true; // or false
  result.gulpIsort.errorCount = 0; // number of errors returned by isort
  result.gulpIsort.errorList = []; // isort errors
  result.gulpIsort.infoList = []; // isort messages and warnings

The objects in errorList and infoList all have the following properties

result.gulpIsort.errorList = [{
  'filename': 'full path of the filename',
  'reason': 'a description of the error'
}]

result.gulpIsort.infoList = [{
  'filename': 'full path of the filename',
  'reason': 'a description of the error'
}]

Custom Reporters

Custom reporter functions can be passed as gulpIsort.reporter(reporterFunc). The reporter function will be called for each linted file that includes an error or warning and will be passed the result object as described above.

var gulpIsort = require('@petervanderdoes/gulp-isort');
var gulp = require('gulp');
var gulpUtil = require('gulp-util');

var myReporter = function(file) {
  gulpUtil.log(result.gulpIsort.errorCount + ' errors');
};

gulp.task('lint', function() {
  return gulp.src('*.py')
    .pipe(gulpIsort())
    .pipe(gulpIsort.reporter(myReporter));
});

See src/reports.js for more detailed examples.