Permalink
Browse files

Fix scaffolding

  • Loading branch information...
1 parent 2dd0e70 commit a25fa216c74353285a0afe87a3b3a2f44cd67b3f @DamonOehlman committed Mar 31, 2012
Showing with 11 additions and 9 deletions.
  1. +1 −1 lib/actions/config.js
  2. +10 −8 lib/actions/scaffold.js
View
2 lib/actions/config.js
@@ -7,7 +7,7 @@ var events = require('events'),
_ = require('underscore'),
repoTypes = {
github: {
- regex: /^git\:\/\/github.com\/(\w+)\/(.*)\.git$/,
+ regex: /^(?:git|https?)\:\/\/github.com\/(\w+)\/(.*)\.git$/,
replace: 'https://github.com/$1/$2'
}
};
View
18 lib/actions/scaffold.js
@@ -1,8 +1,8 @@
-var docstar = require('../docstar'),
- events = require('events'),
+var events = require('events'),
debug = require('debug')('docstar'),
path = require('path'),
- util = require('util');
+ util = require('util'),
+ out = require('out');
function _sync(docstar, scaffolder, callback) {
scaffolder.loadPackageData(function(err, data) {
@@ -18,15 +18,17 @@ function _sync(docstar, scaffolder, callback) {
});
};
-module.exports = function(opts, callback) {
- var scaffolder = this;
+module.exports = function() {
+ var cli = this;
- docstar.init(opts, function(err, instance) {
+ require('../docstar').init(function(err, docstar) {
if (err) {
- scaffolder.out(err);
+ out('!{red}{0}', err);
}
else {
- scaffolder.copyAssets('docs', callback, instance.path);
+ docstar.scaffolder.copy('docs', docstar.path, function() {
+ cli.run('quit');
+ });
}
});
};

0 comments on commit a25fa21

Please sign in to comment.