metalsmith-sense-sass
Sensible distribution of Sass for metalsmith
Last updated 4 years ago by rstacruz .
MIT · Repository · Bugs · Original npm · Tarball · package.json
$ cnpm install metalsmith-sense-sass 
SYNC missed versions from official npm registry.

metalsmith-sense-sass

A sensible distribution of Sass for Metalsmith.

  • uses metalsmith-sass with environment-specific defaults
    • compresses output on production
    • adds source maps in development mode
  • uses metalsmith-postcss for optional postcss plugins to be used after Sass
  • uses postcss-cssnext when available (for vendor prefix polyfills and more)
  • ignores sass partials (_*.sass)

Status

Options

require('metalsmith-sense-sass')(options)

Available options:

  • sass (Object) — Options to pass to metalsmith-sass. See node-sass for a list of available options.

  • postcss (Object) — List of plugins to load for postcss. This is in the format of a key/value object, where keys are string package names, and the values are options to be passed to each plugin.

Environment variables:

  • NODE_ENV (environment variable) — set to production to enable compression and disable source maps.

Usage

npm install --save metalsmith-sense-sass
  • When using metalsmith.json:

    {
      "plugins": {
        "metalsmith-sense-sass": {}
      }
    }
    
  • When using metalsmith.js:

    var ms = new Metalsmith(__dirname)
      .source('src')
      .destination('public')
      .use(require('metalsmith-sense-sass')())
    

For other installation options (eg, using other postcss plugins), see Installation.

Upgrading from 1.x

metalsmith-sense-sass 1.x uses autoprefixer by default, which 2.x doesn't anymore. To upgrade and keep the old behavior, simply install postcss-cssnext in your project—cssnext includes autoprefixer, and metalsmith-sense-sass will automatically use cssnext if it's available.

Also see

Also consider metalsmith-start as a convenient development server with LiveReload support and more.

Thanks

metalsmith-sense-sass © 2015+, Rico Sta. Cruz. Released under the MIT License.
Authored and maintained by Rico Sta. Cruz with help from contributors (list).

ricostacruz.com  ·  GitHub @rstacruz  ·  Twitter @rstacruz

Current Tags

  • 2.1.0                                ...           latest (4 years ago)

4 Versions

  • 2.1.0                                ...           4 years ago
  • 2.0.0                                ...           4 years ago
  • 1.1.0                                ...           5 years ago
  • 1.0.0                                ...           5 years ago
Maintainers (1)
Downloads
Today 0
This Week 0
This Month 1
Last Day 0
Last Week 1
Last Month 0
Dependencies (7)
Dev Dependencies (3)
Dependents (1)

Copyright 2014 - 2017 © taobao.org |