Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Loading…

Hidden .svn files prevent styleguide generation #11

Closed
dotherightthing opened this Issue · 2 comments

2 participants

Dan Smith Hugh Kennedy
Dan Smith

Hi,

kss-node fails when run on a folder whose contents are managed in Subversion.

Subversion creates a hidden folder (.svn) which contains various copies of the directory contents, appended with .svn-base and .tmp.

I think what is happening is that the script is grabbing these files from the SVN subdirectory, then something is breaking when it attempts to parse them.

Can the current regex be tweaked to only capture files which end in .css/.less, rather than filenames which contain these strings?

Thanks,
Dan

Dan Smith

Update: it seems to fail if there is anything within the .svn folder, so I need to stop it looking in there in the first place.

Dan Smith

After much fiddling with kss.js, I finally resolved this by hacking walk.js:

sudo nano /usr/local/lib/node_modules/kss/lib/walk.js

Was:

if( stat.isDirectory() ) {
    walk(name, options, callbacks);
} else {
    if (!options.mask || name.match(options.mask)) {
        callbacks.file(name);
    }
 }

Now:

if( stat.isDirectory() && !name.match('.svn') ) {
    walk(name, options, callbacks);
} else {
    if (!options.mask || name.match(options.mask)) {
        callbacks.file(name);
    }
 }
Hugh Kennedy hughsk closed this in 3b2e4c5
Hugh Kennedy hughsk referenced this issue from a commit
Hugh Kennedy hughsk actually fix #11 and #16 0f1a2f7
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.