Skip to content

Commit 85e3bf6

Browse files
committed
oooh. BBPromise.bind(this) means I don't have to bind each function
1 parent af85420 commit 85e3bf6

File tree

1 file changed

+15
-15
lines changed

1 file changed

+15
-15
lines changed

index.js

Lines changed: 15 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -80,21 +80,21 @@ class ServerlessPythonRequirements {
8080
};
8181

8282
const before = () => BbPromise.bind(this)
83-
.then(pipfileToRequirements.bind(this))
84-
.then(addVendorHelper.bind(this))
85-
.then(installRequirements.bind(this))
86-
.then(packRequirements.bind(this))
87-
.then(linkRequirements.bind(this));
83+
.then(pipfileToRequirements)
84+
.then(addVendorHelper)
85+
.then(installRequirements)
86+
.then(packRequirements)
87+
.then(linkRequirements);
8888

8989
const after = () => BbPromise.bind(this)
90-
.then(removeVendorHelper.bind(this))
91-
.then(unlinkRequirements.bind(this));
90+
.then(removeVendorHelper)
91+
.then(unlinkRequirements);
9292

9393
const invalidateCaches = () => {
9494
if (this.options.invalidateCaches) {
9595
return BbPromise.bind(this)
96-
.then(cleanup.bind(this))
97-
.then(removeVendorHelper.bind(this));
96+
.then(cleanup)
97+
.then(removeVendorHelper);
9898
}
9999
return BbPromise.resolve();
100100
};
@@ -106,13 +106,13 @@ class ServerlessPythonRequirements {
106106
'before:deploy:function:packageFunction': before,
107107
'after:deploy:function:packageFunction': after,
108108
'requirements:install:install': () => BbPromise.bind(this)
109-
.then(pipfileToRequirements.bind(this))
110-
.then(addVendorHelper.bind(this))
111-
.then(installRequirements.bind(this))
112-
.then(packRequirements.bind(this)),
109+
.then(pipfileToRequirements)
110+
.then(addVendorHelper)
111+
.then(installRequirements)
112+
.then(packRequirements),
113113
'requirements:clean:clean': () => BbPromise.bind(this)
114-
.then(cleanup.bind(this))
115-
.then(removeVendorHelper.bind(this)),
114+
.then(cleanup)
115+
.then(removeVendorHelper),
116116
};
117117
}
118118
}

0 commit comments

Comments
 (0)