mirror of
https://github.com/serverless/serverless.git
synced 2026-01-18 14:58:43 +00:00
The service directory will be automatically detected if the users CWD is a valid Serverless service directory.
20 lines
551 B
JavaScript
Executable File
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());
|