Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP

Loading…

Hidden .svn files prevent styleguide generation #11

Closed
dotherightthing opened this Issue · 2 comments

2 participants

@dotherightthing

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

@dotherightthing

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.

@dotherightthing

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);
    }
 }
@hughsk hughsk closed this in 3b2e4c5
@hughsk hughsk referenced this issue from a commit
@hughsk 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.