Socket
Socket
Sign inDemoInstall

gulp-styledocco-individual

Package Overview
Dependencies
167
Maintainers
1
Versions
3
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    gulp-styledocco-individual

Gulp plugin for styledocco that supports incremental building


Version published
Weekly downloads
4
Maintainers
1
Created
Weekly downloads
 

Readme

Source

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 NameTypeOptionalDefault
outstringyes'docs'
namestringyesname property of package.json or ''
includesstring[]yesNone
verbosebooleanyesfalse
noMinifybooleanyesfalse
preprocessorstringyesNone
styledoccostringyes./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

Keywords

FAQs

Last updated on 10 Jan 2016

Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

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