kss-node / grunt-kss

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

Using with SCSS Files: Cannot read property 'match' of undefined #6

Closed renet closed 8 years ago

renet commented 8 years ago

Hi, I'm using the following configuration in my Grundfile.js:

kss: {//Living Styleguide (HTML-/CSS-Documentation)
    options: {
        verbose: true,
        template: 'library/styleguide/template',
        css: 'css/my-base/my-base.css'
    },
    dist: {
        src: ['scss/custom'],
        dest: 'library/styleguide/generated'
    }
}

Sorrily I'm getting this error when I run grunt kss:

...
 - 11: inline markup
 - 12: inline markup
...Generating style guide pages:
 - section 1 [Farben]
Fatal error: Cannot read property 'match' of undefined

In /scss/custom there's a bunch of folders containing .scss files with dependencies between some of the .scss files. Can you please help me with this? Thanks in advance! :)

chrisfrancis27 commented 8 years ago

Same problem for me, but with Stylus .styl files.

  1. I dug up an old project, tried to npm install and got an error that the version I was on (0.3) has been removed (why would you ever need to remove legacy package versions?)
  2. Updated to the latest version, tried to build and got a kss-node usage prompt with error that option includeType doesn't exist
  3. Removed that line from my Grunt config and built again - this time Cannot read property 'match' of undefined
JohnAlbin commented 8 years ago

dug up an old project, tried to npm install and got an error that the version I was on (0.3) has been removed (why would you ever need to remove legacy package versions?)

I KNOW!

The previous maintainer of this namespace completely unpublished everything. I don't know why they did that; it's such an extremely bad idea.

Anyway, they gave me the namespace when I asked if I could use it to revive the project.

I tried to recover as much of the Git history as possible, but the original GitHub version was also deleted, so I grabbed what I could from old forks. The last version I could find before I did my rewrite was v0.2.6. :-\ So I don't see how I can recover 0.3 for you. And annoyingly, the previous maintainers pushed 1.0, 2,0 and 3.0 before deleting everything, which is why my version had to be named 4.0.0. :-p

Updated to the latest version, tried to build and got a kss-node usage prompt with error that option includeType doesn't exist

The newest grunt-kss passes all the options onto kss-node, so you can find all the options at: https://www.npmjs.com/package/kss It looks like you want the mask option.

@renet Can you try removing the template: 'library/styleguide/template', line so that you are using the default template? Does the error still happen?

renet commented 8 years ago

This worked, but the template is required to correctly apply the styles to the examples. So our template is buggy. Can you please tell me how I can debug it to find out where the problem lays? grunt kss -d doesn't give me any helpful information.

renet commented 8 years ago

Okay, i found it myself. Many deprecated handlebars were used in this template (as I migrated it from grunt-styleguide). Thanks for your help!