🚀 Launch Week Day 4:Introducing the Alert Details Page: A Better Way to Explore Alerts.Learn More →
Socket
Book a DemoInstallSign in
Socket

metalsmith-sense-sass

Package Overview
Dependencies
Maintainers
1
Versions
4
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

metalsmith-sense-sass

Sensible distribution of Sass for metalsmith

latest
Source
npmnpm
Version
2.1.0
Version published
Maintainers
1
Created
Source

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

Keywords

autoprefixer

FAQs

Package last updated on 10 Oct 2016

Did you know?

Socket

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