Skip to content

Commit 8411ae1

Browse files
author
Aaron Chambers
committed
Merge pull request #11 from strange-studios/implement-configure-hook
Implement `configure` hook for config validation instead of `willDeploy`
2 parents 4e47a12 + b23047e commit 8411ae1

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

index.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ module.exports = {
3838
return {
3939
name: options.name,
4040

41-
willDeploy: function(context) {
41+
configure: function(context) {
4242
var deployment = context.deployment;
4343
var ui = deployment.ui;
4444
var config = deployment.config[this.name] = deployment.config[this.name] || {};

tests/unit/index-nodetest.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -25,11 +25,11 @@ describe('build plugin', function() {
2525
name: 'test-plugin'
2626
});
2727

28-
assert.equal(typeof result.willDeploy, 'function');
28+
assert.equal(typeof result.configure, 'function');
2929
assert.equal(typeof result.build, 'function');
3030
});
3131

32-
describe('willDeploy hook', function() {
32+
describe('configure hook', function() {
3333
it('resolves if config is ok', function() {
3434
var plugin = subject.createDeployPlugin({
3535
name: 'build'
@@ -42,7 +42,7 @@ describe('build plugin', function() {
4242
}
4343
}
4444
};
45-
return assert.isFulfilled(plugin.willDeploy.call(plugin, context));
45+
return assert.isFulfilled(plugin.configure.call(plugin, context));
4646
});
4747
});
4848

0 commit comments

Comments
 (0)