forked from tsibelman/serverless-multi-dotnet
/
index.js
28 lines (25 loc) · 829 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
'use strict';
const BbPromise = require('bluebird');
const pack = require('./lib/pack');
const getPackingInfo = require('./lib/pack');
const funcRuntimeIsDotNet = require('./lib/pack');
class ServerlessDotNet {
constructor(serverless, options) {
this.serverless = serverless;
this.options = options;
if (!options["nopack"]) {
Object.assign(this, pack);
Object.assign(this, getPackingInfo);
Object.assign(this, funcRuntimeIsDotNet);
this.hooks = {
'before:package:createDeploymentArtifacts': () => BbPromise.bind(this).then(this.pack)
};
}
serverless.configSchemaHandler.defineFunctionProperties(Object.keys(serverless.providers)[0], {
properties: {
projectPath: {type: 'string'},
}, required: [],
});
}
}
module.exports = ServerlessDotNet;