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-styledocco-individual

v1.0.2

Published

Gulp plugin for styledocco that supports incremental building

Downloads

30

Readme

gulp-styledocco-individual

Build Status npm version

Gulp plugin for StyleDocco and supports incremental building.

SytleDocco is a great documentation tool for CSS/Less/Sass and so on. And now, this tool does not support incremental building. Because generated docuents have navigations to each others. So we can not generate documents incrementally.

But we can generate documents individually, and then we can do incremental building.

For example:

  • StyleDocco (not individual):

    • path/to/file.css -> path/to/docs/file.html
    • path/to/sub/file.css -> path/to/docs/sub-file.html
    • These documents include navigations for each others.
  • StyleDocco (individual):

    • path/to/file.css -> path/to/docs/file.css/file.html
    • path/to/sub/file.css -> path/to/docs/sub/file.css/file.html
    • These documents do NOT include navigations for each others.

Example

var gulp = require('gulp');
var styledocco = require('gulp-styledocco-individual').styledoccoIndividual;

gulp.task('docs', () => {
  return gulp.src('css/**/*.css')
    .pipe(styledocco({ out: 'docs' }));
});

And this plugin pass through got files when processing is done. So, you can write:

var gulp = require('gulp');
var styledocco = require('gulp-styledocco-individual').styledoccoIndividual;
var autoprefixer = require('gulp-autoprefixer');

gulp.task('docs', () => {
  return gulp.src('css/**/*.css')
    .pipe(styledocco({ out: 'docs' }))
    .pipe(autoprefixer())
    .pipe(gulp.dest('built'));
});

ES2015 style

See Using ES6 with gulp.

import gulp from 'gulp';
import {styledoccoIndividual} from 'gulp-styledocco-individual';

gulp.task('docs', () => {
  return gulp.src('css/**/*.css')
    .pipe(styledoccoIndividual({ out: 'docs' }));
});

Install

$ npm install --save-dev gulp-styledocco-individual

Options

Summary

| Option Name | Type | Optional | Default | |:----------------|:-----------|:---------|:------------------------------------------| | out | string | yes | 'docs' | | name | string | yes | name property of package.json or '' | | includes | string[] | yes | None | | verbose | boolean | yes | false | | noMinify | boolean | yes | false | | preprocessor | string | yes | None | | styledocco | string | yes | ./node_modules/.bin/styledocco |

out

An output directory. It can be a relative path from the cwd.

name

A name of the generated document. It will be used as the document page title.

includes

Included files for the preview in the generated documentation. It can be a relative path from the cwd.

verbose

Show log messages when generating the documentation.

noMinify

Disable minificating CSS/JavaScript in the generated documentation.

preprocessor

A file path for the CSS preprocessor such as '~/bin/lessc'. It can be a relative path from the cwd.

styledocco

A file path for the StyleDocco command such as '~/bin/styledocco'. It can be a relative path from the cwd.

Other API

guessDocumentPath(filePath, basePath [, options])

Returns a file path to the doc. This function is useful for incremental building.

filePath

Type: string

File path to document.

basePath

Type: string

Base path of the filePath. Typically, it should be vinyl.base.

options

Type: { out: string | undefined | null } or undefined or null

Options for gulp-styledocco-individual.

Returns

Type: string

File path to the doc.

License

MIT