Skip to content

Commit

Permalink
updated code to use stack name from provider section if provided
Browse files Browse the repository at this point in the history
  • Loading branch information
rahul tulsian committed Jun 24, 2020
1 parent 40ad7ba commit 452f7e7
Show file tree
Hide file tree
Showing 10 changed files with 4,110 additions and 458 deletions.
7 changes: 7 additions & 0 deletions examples/.serverless_plugins/before-deploy/helper.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
const beforeDeploy = function beforeDeploy(serverless) {
console.log('i am in before deploy');
};

module.exports = {
beforeDeploy
}
14 changes: 14 additions & 0 deletions examples/.serverless_plugins/before-deploy/index.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
const helper = require('./helper');

/**
* The class that will be used as serverless plugin.
*/
class BeforeDeploy {
constructor(serverless, options) {
this.hooks = {
'before:deploy:deploy': () => helper.beforeDeploy(serverless)
}
}
}

module.exports = BeforeDeploy
7 changes: 7 additions & 0 deletions examples/.serverless_plugins/update-creds/helper.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
const updateConfig = async function updateConfig(serverless) {
console.log('i am in config');
};

module.exports = {
updateConfig
}
16 changes: 16 additions & 0 deletions examples/.serverless_plugins/update-creds/index.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
const helper = require('./helper');

/**
* The class that will be used as serverless plugin.
*/
class UpdateConfig {
constructor(serverless, options) {
this.serverless = serverless
this.options = options
this.hooks = {
'config:credentials:config': () => helper.updateConfig(serverless)
}
}
}

module.exports = UpdateConfig

0 comments on commit 452f7e7

Please sign in to comment.