Integrating kss with docpad

I’m trying to integrate KSS to be able to generate styleguides from my source sass files. I already installed the node module and then created a writeAfter event which looks as following:

writeAfter: (opts, next)->
  {rootPath, outPath} = @docpad.getConfig()
  command = """
    #{rootPath}/node_modules/.bin/kss-node 
    --source #{rootPath}/src/documents/css
    --destination #{outPath}/styleguide

    """.replace(/\n/g,' ')
  # Execute
  require('safeps').exec(command, {cwd:rootPath, output:true}, next)

  # Chain
  @

Unfortunately the same error keeps returning:

Error: Command failed: /bin/sh -c /Users/Maarten/Desktop/project/node_modules/.bin/kss-node --source src/documents/css --destination styleguide
Usage: kss-node [options]
....
Unknown argument: xdemo

Does anybody know how to handle this?

Seems like a bug with KSS. I’d suggest cross-posting on their GitHub Issue Tracker: https://github.com/kss-node/kss-node/issues and posting the link back here… as your command seems fine, with the error complaining about something you aren’t giving it…