Initial commit
[yaffs-website] / node_modules / postcss-load-options / lib / options.js
1 // ------------------------------------
2 // #POSTCSS - LOAD OPTIONS - OPTIONS
3 // ------------------------------------
4
5 'use strict'
6
7 /**
8  *
9  * @method options
10  *
11  * @param  {Object} options PostCSS Config
12  *
13  * @return {Object} options PostCSS Options
14  */
15 module.exports = function options (options) {
16   if (options.parser && typeof options.parser === 'string') {
17     options.parser = require(options.parser)
18   }
19
20   if (options.syntax && typeof options.syntax === 'string') {
21     options.syntax = require(options.syntax)
22   }
23
24   if (options.stringifier && typeof options.stringifier === 'string') {
25     options.stringifier = require(options.stringifier)
26   }
27
28   if (options.plugins) {
29     delete options.plugins
30   }
31
32   return options
33 }