Foundation-for-Jekyll-sites / jekyll-foundation

Start your Jekyll (v3) project with Zurb Foundation for Sites (v6, sass).
MIT License
179 stars 64 forks source link

util/util/ include #33

Closed Bshally closed 8 years ago

Bshally commented 8 years ago

After a fresh install following the docs here on the repo I have uncommented all of the foundation components and js as needed. On npm start I receive the following error :

Error in plugin 'sass'
Message:
    assets/scss/foundation/_settings.scss
Error: File to import not found or unreadable: util/util
       Parent style sheet: /Users/bshallenberger/Desktop/Project-HQ/jsimp/assets/scss/foundation/_settings.scss
        on line 42 of assets/scss/foundation/_settings.scss
>>  @import 'util/util';
   -^

After searching the foundation issues and stack overflow I've found that I need to include the path to the bower components foundation files in the gulp sass plugin . Following this example I added changed the lines starting on line 13 in the sass.js gulp task file to:

return gulp.src(config.src)
    .pipe($.sourcemaps.init())
    .pipe($.sass({
        includePaths: 'assets/vendor/foundation-sites/scss'
    })
      .on('error', $.sass.logError))
    .pipe(autoprefixer(config.compatibility))

This fixes the initial error but results in the following:

Error in plugin 'sass'
Message:
    assets/vendor/foundation-sites/scss/util/_color.scss
Error: Undefined variable: "$foundation-palette".
        on line 45 of assets/vendor/foundation-sites/scss/util/_color.scss
>>   @if map-has-key($foundation-palette, primary) {
   ------------------^

I feel if I continue to move things around I may just be duplicating the foundation files between vendor and scss, which would seem to defeat the purpose of this build process. This leads me to think I may have something else wrong here but I can't nail it down. Anybody have this problem with the current version or able to point me in the right direction?

Bshally commented 8 years ago

Just saw the gitter.im chat issue. Closing this and posting there.

core77 commented 8 years ago

Hi. I think you can comment out line 42 in assets/scss/foundation/_settings.scss.

I use this file only to overwrite the default values or do some customizations. I simply ignore the import of util/util there. The _settings.scss in assets/vendor/foundation-sites... does the default job.

Bshally commented 8 years ago

Ok, good to know. I found what was needed to fix the error and posted it in the gitter chat. Let me know if its worth a PR.