@hidoo/gulp-task-build-css-stylus
Task that build css by stylus for gulp.
Last updated 8 months ago by hidoo .
MIT · Original npm · Tarball · package.json
$ cnpm install @hidoo/gulp-task-build-css-stylus 
SYNC missed versions from official npm registry.

@hidoo/gulp-task-build-css-stylus

Task that build css by stylus for gulp.

Installation

$ npm install --save-dev gulp@next @hidoo/gulp-task-build-css-stylus

Usage

basic:

import {task} from 'gulp';
import buildCss from '@hidoo/gulp-task-build-css-stylus';

task('css', buildCss({
  src: '/path/to/stylus/main.styl',
  dest: '/path/to/dest'
}));

remove unused CSS:

import {task} from 'gulp';
import buildCss from '@hidoo/gulp-task-build-css-stylus';

task('css', buildCss({
  src: '/path/to/stylus/main.styl',
  dest: '/path/to/dest',
  uncssTargets: ['/path/to/target.html']
}));

API

buildCss

return css build task by stylus

Parameters

  • options Object options (optional, default {})

Examples

import {task} from 'gulp';
import buildCss from '@hidoo/gulp-task-build-css-stylus';

task('css', buildCss({
  name: 'css:main',
  src: '/path/to/stylus/main.styl',
  dest: '/path/to/dest',
  filename: 'styles.css',
  suffix: '.hoge',
  browsers: ['> 0.1% in JP'],
  banner: '/*! copyright <%= pkg.author %> * /\n',
  stylusOptions: {rawDefine: {}},
  url: 'inline',
  urlOptions: {basePath: path.resolve(process.cwd(), 'src/images')},
  uncssTargets: ['/path/to/html/target.html'],
  uncssIgnore: ['.ignore-selector'],
  additionalProcess: (root) => root,
  compress: true
}));

Returns Function<Stream>

Test

$ yarn test

License

MIT

Current Tags

  • 0.15.0                                ...           latest (8 months ago)

24 Versions

  • 0.15.0                                ...           8 months ago
  • 0.14.1                                ...           a year ago
  • 0.14.0                                ...           a year ago
  • 0.13.0                                ...           a year ago
  • 0.12.0                                ...           a year ago
  • 0.11.0                                ...           a year ago
  • 0.10.0                                ...           a year ago
  • 0.9.0                                ...           a year ago
  • 0.8.4                                ...           2 years ago
  • 0.8.3                                ...           2 years ago
  • 0.8.2                                ...           2 years ago
  • 0.8.1                                ...           2 years ago
  • 0.8.0                                ...           2 years ago
  • 0.7.0                                ...           2 years ago
  • 0.6.2                                ...           2 years ago
  • 0.6.1                                ...           2 years ago
  • 0.6.0                                ...           2 years ago
  • 0.5.0                                ...           2 years ago
  • 0.4.0                                ...           2 years ago
  • 0.3.0                                ...           2 years ago
  • 0.2.1                                ...           2 years ago
  • 0.2.0                                ...           2 years ago
  • 0.1.1                                ...           2 years ago
  • 0.1.0                                ...           2 years ago
Maintainers (1)
Downloads
Today 0
This Week 0
This Month 3
Last Day 0
Last Week 0
Last Month 0
Dependencies (15)
Dev Dependencies (12)
Dependents (0)
None

Copyright 2014 - 2016 © taobao.org |