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 🙏

© 2024 – Pkg Stats / Ryan Hefner

gulp-parker

v0.1.6

Published

Gulp plugin for parker, a stylesheet analysis tool.

Downloads

2,375

Readme

gulp-parker Build Status

NPM version Dependency Status NPM downloads MIT License

Gulp plugin for parker, a stylesheet analysis tool.

  • Took code, ideas from @leny and made it work with Gulp.

Getting Started

This plugin requires Gulp ^3.8.10

If you haven't used Gulp before, be sure to check out the Getting Started. Once you're familiar with that process, you may install this plugin with this command:

npm install gulp-parker --save-dev

The "parker" task

Overview

In your project's Gulpfile, add a task named parker.

gulp.task('parker', function() {
	return gulp.src('./test.css')
		.pipe(parker());
});

Options

options.metrics

Type: Array (metric names)
Default value: false

An array of the metrics to use in parker.
By default, gulp-parker use all available metrics.

By now, gulp-parker accepts the following metrics :

  • TotalStylesheets
  • TotalStylesheetSize
  • TotalRules
  • TotalSelectors
  • TotalIdentifiers
  • TotalDeclarations
  • SelectorsPerRule
  • IdentifiersPerSelector
  • SpecificityPerSelector
  • TopSelectorSpecificity
  • TopSelectorSpecificitySelector
  • TotalIdSelectors
  • TotalUniqueColours
  • UniqueColours
  • TotalImportantKeywords
  • TotalMediaQueries
  • MediaQueries

options.file

Type: String (file path)
Default value: false

A file path to log the reported results, in markdown format.
If false is given, the file will not be written.

options.title

Type: String
Default value: Gulp Parker Report

When logging the reported results to file, use this as title of the markdown document.

Usage Examples

Default Options

In this example, the default options are used to shows the results of the parker analysis for the given files.

gulp.task('parker', function() {
	return gulp.src('./*.css')
		.pipe(parker());
});

Custom Options

In this example, custom options are used to shows the results of the parker analysis for the given files, with only the four given metrics, and write the results on a file named report.md

gulp.task('parker', function() {
	return gulp.src('./*.css')
		.pipe(parker({
			file: 'report.md',
			title: 'Gulp test report',
			metrics: [
				"TotalRules",
				"TotalStylesheets"
			]}));
});

Contributing

Lint and test your code using Gulp.

Release History

  • 2015/02/20 : v0.1.0