kss-node / kss-node/grunt-kss

Grunt template not working

Open
#17 2 comments 0 reactions 0 assignees View on GitHub
Dominant language
HTML
Stars
14
Forks
7
PR merge metrics
No merged PRs in 30d

Description

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?

Contributor guide

No contributing guide indexed for this repository

Research direction

Start with GruntFile.js and compare the shown grunt kss configuration with the working kss-node command, using the root/styleguide-template/ path layout as the reproduction case. Run grunt kss with both valid and nonexistent template paths; done means the generated style guide uses the custom template and invalid paths are reported rather than silently falling back.

Written by the indexing model from the issue text.

Assessment

Domain
build-system, tooling
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.