A plugin to process text from css comments
- options
- process [function] Required
- Method to process the comment matching pattern. Receives a postcss comment node as an argument.
- pattern [regex]
- Pattern to filter comments on for processing
- process [function] Required
import processComment from 'postcss-process-comments';
import postcss from 'postcss';
const process = ({ text }) => console.log(text);
// Prints all comments
postcss([ processComment({ process }) ]);
// prints all comments starting with the test TEST
postcss([ processComment({ process, pattern: /^TEST/ })]);