Permalink
Browse files

Fixed issue with index-only operation

  • Loading branch information...
1 parent c6124e6 commit f96dce11ccc7fc3f11510a06960344fd953f73c5 @Trimeego Trimeego committed Mar 17, 2013
Showing with 10 additions and 9 deletions.
  1. +1 −1 LICENSE-MIT
  2. +1 −1 package.json
  3. +8 −7 tasks/wickit.coffee
View
@@ -1,4 +1,4 @@
-Copyright (c) 2013 Trimeego
+Copyright (c) 2013 ICG Group, Inc
Permission is hereby granted, free of charge, to any person
obtaining a copy of this software and associated documentation
View
@@ -1,7 +1,7 @@
{
"name": "grunt-wickit",
"description": "A simple plugin to generate static html from a Github wiki repo, including an index for search capability.",
- "version": "0.1.2",
+ "version": "0.1.3",
"homepage": "https://github.com/ICGGroup/grunt-wickit",
"author": {
"name": "Trimeego",
View
@@ -31,10 +31,11 @@ module.exports = (grunt) ->
git.pull grunt, options.gitUrl, gitTargetPath, (err)->
callback(err, gitTargetPath)
-
+ else
+ callback(null, null)
,
(gitTargetPath, callback)->
- if options.sitePath
+ if options.sitePath and gitTargetPath
console.log "\nCreating site from markdown".underline
# make the wikis directory if not there.
if grunt.file.exists(options.sitePath)
@@ -66,6 +67,8 @@ module.exports = (grunt) ->
grunt.file.copy(filepath, path.join(options.sitePath, path.basename(filepath)))
callback()
+ else
+ callback()
, (callback)->
@@ -81,7 +84,6 @@ module.exports = (grunt) ->
options.indexSelector = ".content"
indexify.build grunt, options.indexFiles, options.indexSelector, (err, index)->
-
indexDestPath = path.join(grunt.wickitBase, options.indexPath)
if grunt.file.exists(indexDestPath)
@@ -116,9 +118,8 @@ module.exports = (grunt) ->
grunt.file.write htmlDestPath, doc
- callback()
-
], (err)->
-
+ if err
+ grunt.fail.fatal err
- done()
+ done()

0 comments on commit f96dce1

Please sign in to comment.