gulp-query-stylus

1.1.1 • Public • Published

gulp-query-stylus

Stylus for gulp-query

Uses cssnano with autoprefixer for optimization

This plugin provides automatic source maps, compiling Stylus into CSS, autoprefixing and minification. Write your CSS rules without vendor prefixes — autoprefixer will do everything itself

npm install gulp-query gulp-query-stylus

Example

Paste the code into your gulpfile.js and configure it

let build = require('gulp-query')
  , stylus = require('gulp-query-stylus')
;
build((query) => {
    query.plugins([stylus])
      .stylus('src/stylus/app.styl','css/','app')
 
      .stylus('src/stylus/admin.styl','css/undercover.css',{
        include: [
          ...
        ]
      })
 
      .stylus({
        from: 'src/stylus/main.styl',
        to: 'css/',
        name: 'main'
      })
      ;
});

And feel the freedom

gulp
gulp --production // For production
gulp watch // Watching change
gulp stylus // Only for stylus
gulp stylus:app // Only for app.stylus
gulp stylus:admin stylus:main watch // Watching change only for admin and main
...

Options

.stylus({
    name: "task_name", // For gulp stylus:task_name 
    from: "stylus/app.styl",
    to: "css/",
    source_map: true,
    source_map_type: 'inline',
    full: false, // if set true is without compress in prod
    include: [
        //'../node_modules/compass-mixins/lib/', // relative path from gulpfile.js 
    ],
    autoprefixer: {
      browsers: ["> 1%", "last 2 versions"],
    }
})

Dependencies (7)

Dev Dependencies (0)

    Package Sidebar

    Install

    npm i gulp-query-stylus

    Weekly Downloads

    2

    Version

    1.1.1

    License

    MIT

    Unpacked Size

    5.25 kB

    Total Files

    3

    Last publish

    Collaborators

    • nurieff