Skip to content

Commit

Permalink
chore: Code re-arrangement.
Browse files Browse the repository at this point in the history
  • Loading branch information
hswolff committed Mar 26, 2017
1 parent 189bf7b commit 768ab7a
Showing 1 changed file with 15 additions and 15 deletions.
30 changes: 15 additions & 15 deletions lib/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -118,21 +118,6 @@ export default class Reptar {
this.destination = Object.create(null);
}

async _processMiddlewares({ middlewaresKey }) {
const middlewares = this.config.get(middlewaresKey);

if (middlewares.length === 0) {
return;
}

const tabs = middlewaresKey.length > 11 ? '\t\t' : '\t\t';

await this._wrapCommand(
`Running "${middlewaresKey}".${tabs}`,
() => processMiddlewares({ middlewares, reptar: this })
);
}

async update({ skipFiles = false } = {}) {
this.config.update();

Expand Down Expand Up @@ -231,6 +216,21 @@ export default class Reptar {
});
}

async _processMiddlewares({ middlewaresKey }) {
const middlewares = this.config.get(middlewaresKey);

if (middlewares.length === 0) {
return;
}

const tabs = middlewaresKey.length > 11 ? '\t\t' : '\t\t';

await this._wrapCommand(
`Running "${middlewaresKey}".${tabs}`,
() => processMiddlewares({ middlewares, reptar: this })
);
}

/**
* Get information about the Reptar installation from its package.json.
* @return {Object}
Expand Down

0 comments on commit 768ab7a

Please sign in to comment.