Skip to content

Commit

Permalink
v2.2.0. Improvement
Browse files Browse the repository at this point in the history
  • Loading branch information
balupton committed Jul 23, 2013
1 parent 551e8a7 commit 741127e
Show file tree
Hide file tree
Showing 4 changed files with 30 additions and 10 deletions.
3 changes: 3 additions & 0 deletions History.md
@@ -1,5 +1,8 @@
## History

- v2.2.0 July 23, 2013
- Updated for DocPad v6.46

- v2.1.0 June 24, 2013
- Dependency updates

Expand Down
10 changes: 6 additions & 4 deletions package.json
@@ -1,6 +1,6 @@
{
"name": "docpad-plugin-repocloner",
"version": "2.1.0",
"version": "2.2.0",
"description": "DocPad plugin that clones out repos into your website",
"homepage": "http://docpad.org/plugin/repocloner",
"keywords": [
Expand All @@ -23,17 +23,19 @@
"url": "https://github.com/docpad/docpad-plugin-repocloner.git"
},
"engines" : {
"node": ">=0.4",
"docpad": ">=6.1 <7"
"node": ">=0.4"
},
"dependencies": {
"extendr": "~2.0.1",
"safeps": "~2.2.2",
"taskgroup": "~3.1.1"
},
"peerDependencies": {
"docpad": ">=6.46 <7"
},
"devDependencies": {
"coffee-script": "~1.6.2",
"docpad": ">=6.37 <7"
"docpad": ">=6.46 <7"
},
"main": "./out/repocloner.plugin.js",
"scripts": {
Expand Down
11 changes: 5 additions & 6 deletions src/repocloner.plugin.coffee
Expand Up @@ -16,7 +16,7 @@ module.exports = (BasePlugin) ->
repos: null

# Clone/Update our DocPad Documentation Repository
generateBefore: (opts,next) ->
populateCollectionsBefore: (opts,next) ->
# Prepare
docpad = @docpad
config = docpad.getConfig()
Expand All @@ -32,9 +32,6 @@ module.exports = (BasePlugin) ->
.replace(/^src/, config.srcPath)
.replace(/^out/, config.outPath)

# Check
return complete() unless opts.reset is true or fsUtil.existsSync(repoDetails.path) is false

# Log
docpad.log('info', "Updating #{repoDetails.name}...")

Expand All @@ -43,14 +40,16 @@ module.exports = (BasePlugin) ->
remote: 'origin'
branch: 'master'
output: true
extendr.extend(_opts,repoDetails)
extendr.extend(_opts, repoDetails)

# Init or Update
safeps.initOrPullGitRepo _opts, (err) =>
# warn about errors, but don't let them kill execution
docpad.warn(err) if err

# Update
docpad.log('info', "Updated #{repoDetails.name}")
complete()
return complete()

# Fire
tasks.run()
Expand Down
16 changes: 16 additions & 0 deletions test/package.json
@@ -0,0 +1,16 @@
{
"name": "no-skeleton.docpad",
"version": "0.1.0",
"description": "New DocPad project without using a skeleton",
"engines": {
"node": "0.10",
"npm": "1.2"
},
"dependencies": {
"docpad": "6.x"
},
"main": "node_modules/docpad/bin/docpad-server",
"scripts": {
"start": "node_modules/docpad/bin/docpad-server"
}
}

0 comments on commit 741127e

Please sign in to comment.