koolth / generator-bourbon-neat

Yeoman generator for a website using thoughtbot's Bourbon Neat. Options for Normalize and Modernizr!
MIT License
34 stars 5 forks source link

Fixed paths for bourbon and neat sass files in main.scss #1

Closed dfosco closed 10 years ago

dfosco commented 10 years ago

My grunt wasn't building properly, turns out the paths for bourbon and neat were different from the installed directories on main.scss.

Not sure my directories were organized the same way as the default project — though I installed directly from Yeoman. Fixed for me!

drpuff commented 10 years ago

Thanks for contrib. You should be able to change the paths to both Bourbon & Neat in the sass.options.loadpath section of the Gruntfile.js to match your install (lines 155 and 156) - it's then possible to @import in main.scss without declaring the directories.

Looks like your install paths for Bourbon & Neat have preceeding underscores so if you add these to all the bower_components/ directory names in Gruntfile.js you should be good to go!

Let me know if this fixes everything.

dfosco commented 10 years ago

Yeah, I figured there was a better solution for this. I tried removing the underscores to do the @​import without the directories, but it does not recognizes the path that way.

Any other idea what the problem might be? Regardless, it's working for now, but I'll try to regenerate the repo later and see if the issue comes up again.

Thanks!

drpuff commented 10 years ago

Try this in your Gruntfile.js:

sass: {
            options: {
                loadPath: [
                    '_bower_components/bourbon/dist/',
                    '_bower_components/neat/app/assets/stylesheets/'
                ]
            },

which should allow sass to locate the Bourbon & Neat files, so you can use:

@import 'bourbon';
@import 'neat'; 

in main.scss.

dfosco commented 10 years ago

Still no good. I get this error message on terminal (same goes for neat): File to import not found or unreadable: bourbon.

I don't think it's relevant for this error message, but I had to remove Modernizr from my gruntfile.js and package.json, as it was breaking my build. Not sure what was causing the error, though, as I'm fairly new with Grunt.

drpuff commented 10 years ago

It does sound like a settings issue, especially as the files can't be found.

Can you post your Gruntfile.js somewhere and we'll take a look for you - see if we can help :)

dfosco commented 10 years ago

Sure, it's located in the root of this repo: https://github.com/dfosco/cientistamestrecuca

Thanks! :)