There is a css minifying step in the build system. It works well, but sometimes we need to add another step, for example add the
Autoprefixer. Currently, in meteor 1.2 it is not possible to add this step easily.
So, after the
conversation, it was proposed to create a package, that we can use to add postcss and specify the plugins with options and then minify the css file.
This will make it easy for us to use any css pre-processors (less, scss, stylus, etc) and post-processors.
What do you think about that?
Yep, the package would be classified as a “minifier”, and would need to do minification and post-processing in one step.
I’d be willing to look at this, but how would the user specify the plugins he wants and how would these npm packages be downloaded (which currently are hard-coded in the package.js npm.depends …)?
I started with just extending the standard minifiers with autoprefixing, you can test by cloning this branch:
If we want to make this more generic we need to have an answer on how add new npm packages based on some configuration file. But I guess 90% of the people will be happy with only autoprefixing.
Note that you would want to specify plugins that run always, or only on build (e.g. cssnano, which could run instead of the default minifier).
Hey, looking for a specific file inside
.meteor isn’t the right way to do this. Please use the
filenames option in the build plugin API, which was added for this particular purpose:
Wow, OK. Umm perhaps we can fix that in 1.2.1? Let me see what changes to the code would be necessary.
Filed some issues on GitHub:
_6 Upvotes_ I want to create a meteor compiler for CSS autoprefixer.
The problem is, if I add a compiler for 'css'-extensions,...
Currently, you can't specify a configuration filename for a minifier build plugin.
We need this for CSS autoprefixer: #5219
@sebakerckhof noticed this check...
Perhaps, the best place to talk about this would be on the issue about autoprefixer.