-
Notifications
You must be signed in to change notification settings - Fork 13
/
Copy pathindex.js
35 lines (28 loc) · 795 Bytes
/
index.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
'use strict';
const BbPromise = require('bluebird');
const clean = require('./lib/clean');
const compile = require('./lib/compile');
const pack = require('./lib/pack');
class ServerlessDotNet {
constructor(serverless, options) {
this.serverless = serverless;
this.options = options;
this.configuration = this.options.hasOwnProperty('configuration') ?
this.options.configuration :
'Release';
Object.assign(
this,
clean,
compile,
pack
);
this.hooks = {
'before:deploy:createDeploymentArtifacts': () => BbPromise.bind(this)
.then(this.clean)
.then(this.compile),
'after:deploy:createDeploymentArtifacts': () => BbPromise.bind(this)
.then(this.pack)
};
}
}
module.exports = ServerlessDotNet;