1.0.4 • Published 5 years ago

postcss-scss-inline-comments v1.0.4

Weekly downloads
-
License
MIT
Repository
-
Last release
5 years ago

postcss-scss-inline-comments

PostCSS plugin to convert css multiline comments to sass inline comments.

Installation

With yarn

$ yarn add postcss-scss-inline-comments

Or npm:

$ npm install --save postcss-scss-inline-comments

Usage

const fs = require('fs'),
	postcss = require('postcss'),
	syntax = require('postcss-scss'),
	inlineComments = require('postcss-scss-inline-comments')
	
const scss = fs.readFileSync('scss/input.scss', 'utf-8')
	
postcss([inlineComments()]).process(scss, {
  syntax: syntax,
  from: 'scss/input.scss',
})

scss/input.scss:

/**
 * A mixin for important things.
 */
@mixin a-mixin {
  color: red;
}

Will give you:

//
// A mixin for important things.
//
@mixin a-mixin {
  color: red;
}

For more information see the scss-extractor documentation.