Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Loading…

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

Merged
merged 1 commit into from

2 participants

John Albin Wilkins Johannes Troeger
John Albin Wilkins
Owner

Fixes #40

John Albin Wilkins
Owner

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

Johannes Troeger johannestroeger merged commit ed7d5d8 into from
Johannes Troeger johannestroeger deleted the branch
John Albin Wilkins
Owner

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

John Albin Wilkins
Owner

New PR at #82

John Albin Wilkins
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?

Johannes Troeger
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
14 bin/kss-node
View
@@ -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
2  package.json
View
@@ -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.