Sha256: 87f09af88cd74b7671e52f04cb157a5908dd3eb1bc20526a3b78ef3b5bf38054
Contents?: true
Size: 1.02 KB
Versions: 28
Compression:
Stored size: 1.02 KB
Contents
'use strict' const req = require('import-cwd') /** * Load Options * * @private * @method options * * @param {Object} config PostCSS Config * * @return {Object} options PostCSS Options */ const options = (config, file) => { if (config.parser && typeof config.parser === 'string') { try { config.parser = req(config.parser) } catch (err) { throw new Error(`Loading PostCSS Parser failed: ${err.message}\n\n(@${file})`) } } if (config.syntax && typeof config.syntax === 'string') { try { config.syntax = req(config.syntax) } catch (err) { throw new Error(`Loading PostCSS Syntax failed: ${err.message}\n\n(@${file})`) } } if (config.stringifier && typeof config.stringifier === 'string') { try { config.stringifier = req(config.stringifier) } catch (err) { throw new Error(`Loading PostCSS Stringifier failed: ${err.message}\n\n(@${file})`) } } if (config.plugins) { delete config.plugins } return config } module.exports = options
Version data entries
28 entries across 27 versions & 10 rubygems