Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Added scaffold action, bump version (0.0.5)
- Loading branch information
Damon Oehlman
committed
Jan 13, 2012
1 parent
5bcd5e9
commit bda2a8d
Showing
4 changed files
with
35 additions
and
5 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
var docstar = require('../docstar'), | ||
events = require('events'), | ||
debug = require('debug')('docstar'), | ||
path = require('path'), | ||
util = require('util'); | ||
|
||
function _sync(docstar, scaffolder, callback) { | ||
scaffolder.loadPackageData(function(err, data) { | ||
if (! err) { | ||
docstar.tweakConfig({ | ||
copyright: (new Date().getFullYear()) + ', ' + data.author, | ||
project: data.name, | ||
version: data.version | ||
}); | ||
} | ||
|
||
callback(err, data); | ||
}); | ||
}; | ||
|
||
module.exports = function(opts, extraArgs, callback) { | ||
var scaffolder = this; | ||
|
||
docstar.init(opts, function(err, instance) { | ||
if (err) { | ||
scaffolder.out(err); | ||
} | ||
else { | ||
scaffolder.copyAssets('docs', callback, instance.path); | ||
} | ||
}); | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters