kss-node / grunt-kss

KSS style guide generator for grunt.
MIT License
14 stars 7 forks source link

Grunt template not working #17

Open aliwright75 opened 7 years ago

aliwright75 commented 7 years ago

I'm trying to write a grunt task for kss in my GruntFile.js, but it seems to be ignoring my custom template. It works if I do it from the cmd line:

kss-node app/scss styleguide --css ../app/css/style.css --template styleguide-template/

But not in Grunt... Here's my code:

 kss: {
   options: {
        verbose: true,
        template: 'styleguide-template/',
        css: '../app/css/style.css'
    },
    dist: {
        files: {
          './styleguide/': ['app/scss/']
        }
    }
  }

My structure is roughly like this:

root/
  app/
    css/
    scss/
  GruntFile.js
  styleguide/
  styleguide-template/

I created the custom template by running kss-node --init styleguide-template, and I tweaked some styles/code so it was obvious I was using my own template...

When running grunt kss in the cmd line directly, it says it is successful. But yet it doesn't use my template path. It just uses the default one still, and never raises any errors if I do a non-existing path for the template...

I've tried variations on the path location:

template: '/styleguide-template/'
template: './styleguide-template/'
template: '../styleguide-template/'

But no joy... I've even tried relocating the template folder inside my 'styleguide' folder.

Any ideas?

RobLoach commented 7 years ago

Could you test on the master version of this? There were some Promise updates.

JohnAlbin commented 7 years ago

5.0.1 is out, please test.

Oh, also, in 5.x, we are using kss 3.x where the "template" option was changed to "builder".

If you want to use kss 2.x and its template option, you'll need to use grunt-kss 4.x.