serverless/bin/serverless
Philipp Muens 39d30b3ca0 Add automatic servicePath detection functionality
The service directory will be automatically detected if the users CWD is a valid
Serverless service directory.
2016-05-26 14:34:56 +02:00

20 lines
551 B
JavaScript
Executable File

#!/usr/bin/env node
'use strict';
// Note: TestsPlugin is only used for tests
const TestsPlugin = require('../lib/plugins/tests/tests');
const Serverless = require('../lib/Serverless');
const serverless = new Serverless({
interactive: typeof process.env.CI === 'undefined',
});
// check if it's a test (e.g. an integration test) and modify the serverless instance accordingly
if (process.argv.indexOf('--serverless-integration-test') > -1) {
serverless.pluginManager.addPlugin(TestsPlugin);
}
serverless.init().then(() => serverless.run());