Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP

Loading…

Prevent hidden files (like .svn folders) from being copied from template. #81

Merged
merged 1 commit into from

2 participants

@JohnAlbin
Owner

Fixes #40

@JohnAlbin
Owner

hmm… doesn't seem to actually work though. :-p

@johannestroeger johannestroeger merged commit ed7d5d8 into master

1 check passed

Details continuous-integration/travis-ci The Travis CI build passed
@johannestroeger johannestroeger deleted the template-hidden-files branch
@JohnAlbin
Owner

@johannestroeger Why did you merge this when I said the code doesn't work?

@JohnAlbin
Owner

New PR at #82

@JohnAlbin
Owner

@johannestroeger I created a new yellow label called "Needs work". Hopefully that will prevent any of us from merging code that one of us thinks isn't ready. Example at #78

I'll assume you accidentally skipped over my comment and didn't see it. (Like I did over in #67 (comment) ) We'll make better mistaks tomorrow?

@johannestroeger
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
This page is out of date. Refresh to see the latest.
Showing with 13 additions and 3 deletions.
  1. +12 −2 bin/kss-node
  2. +1 −1  package.json
View
14 bin/kss-node
@@ -79,7 +79,13 @@ if (argv.init) {
}
console.log('Creating a new styleguide template...');
- wrench.copyDirSyncRecursive( __dirname + '/../lib/template', argv.init );
+ try {
+ wrench.copyDirSyncRecursive( __dirname + '/../lib/template', argv.init );
+ }
+ catch (e) {
+ console.log('Error! ' + argv.init + ' already exists.');
+ return;
+ }
console.log('You can change it as you like, and use it with your styleguide like so:');
console.log('');
console.log('kss-node [sourcedir] --template "'+argv.init+'"');
@@ -115,7 +121,11 @@ try {
wrench.copyDirSyncRecursive(
config.templateDirectory + '/public',
- config.destinationDirectory + '/public'
+ config.destinationDirectory + '/public',
+ {
+ forceDelete: true,
+ excludeHiddenUnix: true
+ }
);
// Generate the static HTML pages in the next tick, i.e. after the other functions have
View
2  package.json
@@ -22,7 +22,7 @@
"marked": "0.1.x",
"natural": "0.0.65",
"handlebars": "1.3.x",
- "wrench": "1.3.x",
+ "wrench": "1.5.x",
"less": "1.x.x",
"stylus": "0.46.x",
"sass": "0.5.x",
Something went wrong with that request. Please try again.