🚀 Socket Launch Week 🚀 Day 2: Introducing Repository Labels and Security Policies.Learn More

postcss-comment

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

postcss-comment

Allow postcss to support inline comments

0.1.1
Version published
Maintainers
1
Created

postcss-comment

Allow postcss to support inline comments.

Usage

npm i --save postcss postcss-comment

var postcss = require('postcss-comment')

var fs = require('fs')

var file = __dirname + '/inline.css'

postcss()
  .process(
    fs.readFileSync(file, 'utf8'),
    { from: file }
  )
  .then(function (result) {
    console.log(result.css)
  })

inline.css:

// comments
// comments
.inline-comment { // comments
  // comments
  color: red; // comments
} // comments
// comments

outputs:

/* comments */
/* comments */
.inline-comment { /* comments */
  /* comments */
  color: red; /* comments */
} /* comments */
/* comments */

FAQs

Package last updated on 04 Nov 2015

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