Skip to content

Commit 6c7362b

Browse files
committed
Use 'package' hook instead of 'deploy'
The 'deploy' hook simply leverages the 'package' hook. By using the 'package' hook instead of 'deploy' you get both for the price of one! This lets a user use both the $ sls deploy and $ sls package CLI commands. Source: https://github.com/serverless/serverless/blob/master/lib/plugins/deploy/deploy.js#L95
1 parent f0d6626 commit 6c7362b

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/index.ts

+2-2
Original file line numberDiff line numberDiff line change
@@ -25,8 +25,8 @@ class ServerlessPlugin {
2525

2626
this.hooks = {
2727
'before:offline:start:init': this.beforeCreateDeploymentArtifacts.bind(this),
28-
'before:deploy:createDeploymentArtifacts': this.beforeCreateDeploymentArtifacts.bind(this),
29-
'after:deploy:createDeploymentArtifacts': this.afterCreateDeploymentArtifacts.bind(this),
28+
'before:package:createDeploymentArtifacts': this.beforeCreateDeploymentArtifacts.bind(this),
29+
'after:package:createDeploymentArtifacts': this.afterCreateDeploymentArtifacts.bind(this),
3030
'before:invoke:local:invoke': this.beforeCreateDeploymentArtifacts.bind(this),
3131
'after:invoke:local:invoke': this.cleanup.bind(this),
3232
}

0 commit comments

Comments
 (0)