UNPKG

postcss-tape

Version:
12 lines (10 loc) 289 B
const postcss = require('postcss') module.exports = postcss.plugin('test-plugin', options => { return (root, result) => { if (Object(options).shouldFail) { throw new Error('This should fail.') } else if (Object(options).shouldWarn) { result.warn('This should warn.') } } })