eduardoboucas / include-media

📐 Simple, elegant and maintainable media queries in Sass
https://eduardoboucas.github.io/include-media/
MIT License
2.57k stars 191 forks source link

Add support for eyeglass #80

Closed eduardoboucas closed 8 years ago

eduardoboucas commented 9 years ago

https://github.com/sass-eyeglass/eyeglass

TxHawks commented 8 years ago

Any update on this? Whould be very helpful

eduardoboucas commented 8 years ago

I didn't have the chance to look further into this. What are your views on it? Why do you say it would be very useful? Do you have any use case in mind?

nathanjessen commented 8 years ago

+1 I use include-media in all my projects but have never found a great way to import it into my sass files. I typically have to manually download the scss file and store it in a vendor directory. Any time I need to update the vendor libraries on my sites I have to manually update this file. Eyeglass would allow me to update the dependency version in package.json and not have to worry about manually editing/maintaining the file.

nirazul commented 8 years ago

@nathanjessen I was also thinking that I needed eyeglass support, but if you are using node-sass (or some task-runner adaption of it, like gulp-sass you can simply register your node_modules folder in the includePaths option. Then you are able to import include-media like that:

@import 'node_modules/include-media/dist/include-media.scss';

eduardoboucas commented 8 years ago

Also, doesn't this help you?

nathanjessen commented 8 years ago

Hmm yea. I think it would be nice to see some sample build implementations like this in the readme or other documentation. I assume a lot of people are using gulp, grunt, or similar build systems but aren't super-strong with JS (myself included). I had no idea there was an includePath I could hook into.

But I should also speak to a need for Eyeglass still. On larger projects it becomes a pain to maintain dependencies like this in more than 1 location. I want to put a dependency into my package.json and just have it work. I don't want to have a long list of paths in my includePaths option of the gulp task that I also maintain. An additional issue is, my current project has a repository for our core-build which houses our gulp tasks (with Eyeglass) and other build functionality but avoids adding anything that isn't directly used to create the builds. Then we have other repositories for building new sites which pull in the core-build dependency but don't have a gulp file to edit to include new paths. Maybe it is possible to add a new JS file that would extend the core-build gulpfile but I'm not strong enough in that area to know how. If include-media were available as an eyeglass module, we could put the dependency into package.json and automatically be able to import it into sass files within the new site without the issue of being unable to add it to the gulp-sass included paths.

eduardoboucas commented 8 years ago

I won't have the time to look into implementing this during the next few weeks, but more than happy to look at any pull requests.

eduardoboucas commented 8 years ago

Closing via #131.