zmoazeni / csscss

A CSS redundancy analyzer that analyzes redundancy.
http://zmoazeni.github.io/csscss/
MIT License
2.92k stars 151 forks source link

Bourbon support in Rails project #40

Closed datacoup closed 11 years ago

datacoup commented 11 years ago

When parsing scss files referencing the bourbon mixin, I receive error:

File to import not found or unreadable: bourbon. (Sass::SyntaxError)
zmoazeni commented 11 years ago

Thanks for the report @datacoup. I don't know much about bourbon.io so I'll need to tinker a little. And might ask more questions.

Melindrea commented 11 years ago

Do you have a config.rb with that as a requirement in it?

This issue is coming down from Sass - it needs to know to require the gems. If your config.rb isn't in the folder that you're wanting to run csscss, use --compass-with-config to specify the path to it.

zmoazeni commented 11 years ago

Thanks @Melindrea great idea. Though I'm not fond of using a switch with compass for non-compass stuff. I'll keep the conversation going in #54

zmoazeni commented 11 years ago

@datacoup I just released v1.3.0 with a new --require path/to/file.rb flag. That should let you bootstrap bourbon. /cc @kaishin

kaishin commented 11 years ago

@datacoup @zmoazeni Thanks guys for bringing this up. I tried --require with a config.rb file and it's working like a charm.

# in config.rb
require 'bourbon'
require 'neat'

And the command:

csscss --require config.rb application.css.scss

For now, that'll do it.

datacoup commented 11 years ago

@zmoazeni Thanks for making it awesome. And thanks @Melindrea for initial idea. Easy and elegant