Skip to content

Commit

Permalink
minor corrections and formatting
Browse files Browse the repository at this point in the history
  • Loading branch information
amwmedia committed Feb 19, 2015
1 parent 0c6ae7d commit 1854333
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 8 deletions.
6 changes: 3 additions & 3 deletions mod/logic.js
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,8 @@ module.exports = (function () {

var _d = q.defer(),
prompts = config.prompts;
prompt.message = colors.green(gName);

prompt.message = colors.green(gName.toUpperCase());
prompt.start();
prompt.get({properties: prompts}, function (err, result) {
if (err) { _d.reject(err); }
Expand Down Expand Up @@ -50,7 +50,7 @@ module.exports = (function () {
_chain = _d.promise,
template = action.template || '',
filePath = makePath(plop.renderString(action.path || '', data));

_chain = _chain.then(function () {
if (template) {
return template;
Expand Down
6 changes: 3 additions & 3 deletions mod/plop-base.js
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ module.exports = (function () {
function renderString(template, data) {
var t = template,
h;

for (h in helpers) {
if (!helpers.hasOwnProperty(h)) { continue; }
handlebars.registerHelper(h, helpers[h]);
Expand All @@ -37,15 +37,15 @@ module.exports = (function () {
function setGenerator(name, config) { generators[name] = config; }
function getGenerator(name) { return generators[name]; }
function getGeneratorList() { return Object.keys(generators); }

function setPlopfilePath(path) { plopfilePath = path; }
function getPlopfilePath() { return plopfilePath; }


return {
addHelper: addHelper,
renderString: renderString,

setGenerator: setGenerator,
getGenerator: getGenerator,
getGeneratorList: getGeneratorList,
Expand Down
4 changes: 2 additions & 2 deletions plop.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ var plop = require('./mod/plop-base'),

function run(plopfilePath) {
var generators;

// set the default base path to the plopfile directory
plop.setPlopfilePath(path.dirname(plopfilePath));

Expand All @@ -37,7 +37,7 @@ function run(plopfilePath) {
});
} else {
throw Error('Generator ' + generator + ' not found in plopfile');
}
}
}

// locate the plopfile
Expand Down

0 comments on commit 1854333

Please sign in to comment.