summaryrefslogtreecommitdiffstats
path: root/lib/generate/index.js
diff options
context:
space:
mode:
Diffstat (limited to 'lib/generate/index.js')
-rw-r--r--lib/generate/index.js12
1 files changed, 9 insertions, 3 deletions
diff --git a/lib/generate/index.js b/lib/generate/index.js
index 73d1079..14168fd 100644
--- a/lib/generate/index.js
+++ b/lib/generate/index.js
@@ -19,10 +19,16 @@ var generate = function(root, output, options) {
if (!options.github || !options.title) return Q.reject(new Error("Need options.github and optiosn.title"));
+
+ // Clean output folder
+ return fs.remove(output)
+
// List all files in the repository
- return Q.nfcall(glob, "**/*", {
- cwd: root,
- mark: true
+ .then(function() {
+ return Q.nfcall(glob, "**/*", {
+ cwd: root,
+ mark: true
+ });
})
// Check repository is valid