abc-generator
Advanced tools
Comparing version 0.0.2 to 0.0.3
@@ -22,9 +22,13 @@ var fs = require('fs'); | ||
this.abcLogo = ' _____ ___________________ \n' + | ||
' / _ \\\\______ \\_ ___ \\ \n' + | ||
' / /_\\ \\| | _/ \\ \\/ \n' + | ||
'/ | | | \\ \\____\n' + | ||
'\\____|__ |______ /\\______ /\n' + | ||
' \\/ \\/ \\/ \n'; | ||
this.enableUI = options.enableUI; | ||
if (this.enableUI) { | ||
this.log.error('UI is enabled!'); | ||
this.uiRoot = options.uiRoot || require('path').resolve(__dirname, '../../../ui'); | ||
this.log.writeln('uiRoot is %s', this.uiRoot); | ||
this.UISetup(); | ||
@@ -52,3 +56,3 @@ } | ||
// rewrite conflicter's resolve | ||
this.conflicter.resolve = function(callbck) { | ||
self.conflicter.resolve = function(callback) { | ||
@@ -60,9 +64,6 @@ if (!self._uiConflicts.length) { | ||
self._uiConflicts = []; | ||
this.once('resolved-conflict', function(args) { | ||
callbck(args[0], args[1]); | ||
}); | ||
async.forEachSeries(self._uiConflicts, function(conflict, callback) { | ||
self.emit('conflict', { | ||
@@ -74,11 +75,16 @@ filepath: conflict.filepath, | ||
self.once('resolved:' + conflict.filepath, function(args) { | ||
conflict.callback.call(self, args); | ||
callback() | ||
self.once('resolved:' + conflict.filepath, function(method) { | ||
conflict.callback.call(self, null, method); | ||
callback(); | ||
}); | ||
}, callback); | ||
self._uiConflicts = []; | ||
}; | ||
_.extend(this, { | ||
_.extend(self, { | ||
/** | ||
@@ -90,8 +96,5 @@ * reWrite prompt for ui use | ||
prompt: function(prompts, done) { | ||
console.log('my prompt: ', done); | ||
this.emit('prompt', prompts); | ||
this.once('resolve-prompt', function (args) { | ||
console.log('resolved', done); | ||
console.log(args); | ||
done(args[0],args[1]); | ||
@@ -152,3 +155,3 @@ }.bind(this)); | ||
resolveConflict: function(filepath, method) { | ||
this.emit('resolved:' + filepath, arguments); | ||
this.emit('resolved:' + filepath, method); | ||
} | ||
@@ -155,0 +158,0 @@ }); |
{ | ||
"name": "abc-generator", | ||
"version": "0.0.2", | ||
"version": "0.0.3", | ||
"description": "generator for abc", | ||
@@ -20,4 +20,5 @@ "main": "main.js", | ||
"lodash": "~1.2.0", | ||
"yeoman-generator": "~0.11.1" | ||
"yeoman-generator": "~0.11.1", | ||
"async": "~0.2.8" | ||
} | ||
} |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
4849
3
134
+ Addedasync@~0.2.8