pascalduez/postcss-map

Gob patterns support

Opened this issue · 4 comments

Add glob patterns support in options for map files?
I'm not sure this is really needed.

var opts = {
  basePath: 'css/',
  maps: [ '*.yml' ]
};
var opts = {
  basePath: 'css/',
  maps: [ '{example, breakpoints, fonts}.{yml, json}' ]
};

@pascalduez Do you want to add also json support?

  1. This issue is just for gathering feedback, nothing planned so far.
  2. There's already JSON support, since the yaml.safeLoad method support both.

@pascalduez Wow, cool! Didn't know about json support :)

what if you require file instead of readFile and then yaml.safeLoad? benefit will be that one can also load .js file or .someext if loader for it is registered in require