Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Autoprefix styles #9

Closed
jewbetcha opened this issue May 9, 2017 · 16 comments
Closed

Autoprefix styles #9

jewbetcha opened this issue May 9, 2017 · 16 comments

Comments

@jewbetcha
Copy link

Great job with Pingy CLI! Super cool.

The only thing I feel like I'm missing is autoprefixing of styles, any way to add that myself? Or plans to add it?

@randallmlough
Copy link

+1 for this!

@davej
Copy link
Member

davej commented May 9, 2017

This is on the todo list. I don't think I want to enable it by default, so I think I'll make it an option in the .pingy.json file.

{Gasp}... I guess that counts as configuration! 😃

@jewbetcha
Copy link
Author

Woot 🙌 sounds good!

@randallmlough
Copy link

I think that's an acceptable config!

Btw - I know you're going for a no config required with this, but for some advanced options - this for example - I think having some config options is perfectly acceptable!

@sjclark
Copy link

sjclark commented May 10, 2017

This tool is fantastic but the lack of auto-prefixer stops me using it for now - don't think I've ever had a gulp (or brunch) config without auto-prefixing. Is there any reason why prefixing couldn't just be built-in? Rather than an "advanced option"? (ie. does it break / cause problems with any common workflows?)

@davej
Copy link
Member

davej commented May 10, 2017

@sjclark My issue is that vendor-prefixes are not being used by browser vendors anymore, so I'm wary of adding bloat that won't be so relevant in a couple of years. Having said that, I'll add it as a configuration option. Might be ready by tomorrow.

@sjclark
Copy link

sjclark commented May 10, 2017

won't be so relevant in a couple of years

Guess thats the key, still very relevant for now - i know you're anti-config but what if you had a vendor-prefix config line that just took the arguments ie: 'last 2 versions','iOS >= 8','Safari >= 8' - don't need any prefixing then don't put anything?

Even with that config line above (which I consider liberal) my clients complain that "Oh, it doesn't seem to work on my daughters iPad" - although everyone signs a contract that stipulates it will support the latest version of IE, Edge, Chrome (&mobile), Firefox, and nothing else. Clients be clients.
Anywho, sounds good 👍 drop a comment here if you end up updating it tomorrow? Also your website is beautiful btw - love all the little animations!

@davej
Copy link
Member

davej commented May 10, 2017

i know you're anti-config but what if you had a vendor-prefix config line that just took the arguments ie: 'last 2 versions','iOS >= 8','Safari >= 8' - don't need any prefixing then don't put anything?

That's exactly what I'm doing, hopefully it will be ready for tomorrow.

@ronilaukkarinen
Copy link

Thanks for this project. Been using gulp from the very start and autoprefix is the essential feature. Will wait for pingy to mature, then going to give it another chance.

@davej
Copy link
Member

davej commented May 11, 2017

Hey everyone, this is available in 0.7.0 beta. 🎉

Details of the release and how to install it are here: https://github.com/pingyhq/pingy-cli/releases/tag/%40pingy%2Fcli%400.7.0

I would very much appreciate your help in testing it out. 👍

@jewbetcha
Copy link
Author

This is working well for me!

@Munter
Copy link
Contributor

Munter commented Sep 2, 2017

You could use the browsers field in package.json which it seems the community is converging on. If it's there, autoprefix. If it's not, don't. I think that would be a fair convention

@davej
Copy link
Member

davej commented Sep 2, 2017

@Munter Good idea, I didn't know about that. I'll add support 👍.

@Munter
Copy link
Contributor

Munter commented Sep 4, 2017

@davej Looks like you won't even have to: https://github.com/ai/browserslist/blob/master/index.js#L158-L288

Seems you can use this to get the config from the already supported configuration conventions. Then decide what to do based on the return value I think.

@davej davej added this to the v0.9 milestone Sep 26, 2017
@davej
Copy link
Member

davej commented Sep 27, 2017

This is out of beta for v0.8+.

I'm not adding browsers in package.json support yet because I need to think about it more and possibly also consider whether it should also be honoured by Babel and passed along to babel-preset-env.

Usage

To enable autoprefix then just add the following entry to your .pingy.json:

{
  //...
  "autoprefix": true,
  //...
}

This will default to autoprefixing for the last 2 browser versions if set to true. But you can also set it to a string or an array of strings (e.g.. ["> 5%", "last 1 version"]). More info on available queries here.

@davej davej modified the milestones: v0.10, pre-v1.0 Oct 5, 2017
@davej
Copy link
Member

davej commented Nov 16, 2017

Closing as this feature is considered stable as of v0.10. Support for the browsers property in package.json will be tracked in #70.

# for free to join this conversation on GitHub. Already have an account? # to comment
Projects
None yet
Development

No branches or pull requests

6 participants