docpad / docpad-plugin-autoprefix

Auto vendor/browser prefix CSS so you don't have to!
Other
1 stars 2 forks source link

Configuration? #1

Open tbusser opened 10 years ago

tbusser commented 10 years ago

Is there anyway to indicate which browser version should be supported like in the original project? For instance I need IE8 support but this is no longer covered by the default last two browser versions.

roblafeve commented 10 years ago

Ditto

garthk commented 9 years ago

Yes, but you'll need to write your own plugin until @balupton catches up and can add two lines. Don't worry; it's just two files in your plugins directory, and then you can set plugins.autoprefix.browsers in your docpad.coffee.

balupton commented 9 years ago

@garthk want push+publish access?

schlaup commented 9 years ago

@garthk : You cannot pass browsers in your plugin as requested by @tbusser. I commented and fixed your code. (https://gist.github.com/garthk/e468e708d1c3a4c06571)

@balupton : When you want to implement it in your official plugin, make sure to use my fixes. (Btw, it is really easy - would be nice if the official plugin supported options.)

StormPooper commented 9 years ago

@schlaup looks good, what does it do if you don't include any options by default? Might be worth specifying a sensible default, like 'last 2 versions, >5%' or something, if there isn't already a default (couldn't find any mention of a default in the core library). Do you fancy creating a pull request for this?

schlaup commented 9 years ago

The core has defaults. (They are a bit hidden in its sources.) So, if you do not specify a config, the plugin uses the defaults of autoprefixer. (['> 1%', 'last 2 versions', 'Firefox ESR', 'Opera 12.1'])

I do not code in coffee script. Since it affects only a couple of lines, I hope @balupton can incorporate them without much trouble and without a pull request.

In the meantime you can copy the files from @garthk with my fixes.

Make sure the folder structure in your DocPad project is like this:

plugins ++ autoprefix ++++ src ++++++ autoprefix.plugin.js ++++ package.json

Run "npm install" in the folder and nothing else to do, DocPad automatically sees the plugin in the "plugins" folder.

balupton commented 7 years ago

v2.1.0 released, still no custom config - happy for a PR

balupton commented 7 years ago

Really this plugin should become just a postcss plugin