项目原始demo,不改动
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
This repo is archived. You can view files and clone it, but cannot push or open issues/pull-requests.
 
 
 
 

34 lines
733 B

  1. // ------------------------------------
  2. // #POSTCSS - LOAD OPTIONS - OPTIONS
  3. // ------------------------------------
  4. 'use strict'
  5. /**
  6. *
  7. * @method options
  8. *
  9. * @param {Object} options PostCSS Config
  10. *
  11. * @return {Object} options PostCSS Options
  12. */
  13. module.exports = function options (options) {
  14. if (options.parser && typeof options.parser === 'string') {
  15. options.parser = require(options.parser)
  16. }
  17. if (options.syntax && typeof options.syntax === 'string') {
  18. options.syntax = require(options.syntax)
  19. }
  20. if (options.stringifier && typeof options.stringifier === 'string') {
  21. options.stringifier = require(options.stringifier)
  22. }
  23. if (options.plugins) {
  24. delete options.plugins
  25. }
  26. return options
  27. }